"De Groof, Vincent Frans Maria" <[email protected]> writes:
> Dear all, > > > I am writing a few variations on the PCG algorithm. Starting with my own PCG > implementation, I noticed that my routine is quite a bit slower (~20%). I > think I tracked it down to the MatSolve calls in PCApply. I am using BDDC as > the preconditioner. > > In the Petsc PCG function, each PCApply calls the MatSolve 3 times. It also > calls MatSolve once somewhere between calling KSPSolve and KSPSolve_CG > (KSP_SetUp has been called before). So MatSolve is called 1+3*(# iterations) > per KSPSolve. In my own PCG variation, the initial MatSolve is not called. > But MatSolve is called 4 times in each iteration, so in total 4*(# > iterations). > > Where does this MatSolve in between KSPSolve and KSPSolve_CG come from? And > how can I make my function use less MatSolve's? I recommend running in a debugger to get the stack trace. I don't know what is different between your Krylov implementation and CG, but it should be obvious when you compare.
signature.asc
Description: PGP signature
