[petsc-dev] Should PETSc default to a different smoother than SOR for SBAIJ matrices with blocksize > 1?

Jed Brown jed at jedbrown.org
Mon May 9 16:23:43 CDT 2016


Barry Smith <bsmith at mcs.anl.gov> writes:

>   Yeah the type is set in PCMGSetLevels() which is long before the operator on the various levels is even known. 
>
>   Jed would fix this by having a PCAddPreferedType() so one could list multiple multiple preconditioners and then when the beast is actually to be used it picks the first one in the list that is supported by the information it has. So for example PCMGSetLevels() would call PCSetPreferedType(pc,PCSOR); PCSetPreferedType(pc,PCJACOBI); and at PCSetUp() time it would check the matrix to determine which one it could use.

Not all Krylov methods work (mathematically) with both left and right
preconditioning, so that issue can't be resolved entirely by lack of
laziness.  I actually wouldn't advocate this.

>   Barry would fix this by implementing the SOR for the block size you need in SeqSBAIJ and then Jed would complain that Barry didn't use horrific CPP ## code to automatically generate the code for all block sizes. Note also there is nothing inherently difficult about coding SOR for SBAIJ, just laziness.

I don't think CPP is the tool for that.  This should be sufficient to
get specialized code when using a decent compiler (anything but XL;
thankfully bgclang exists).

https://bitbucket.org/hpgmg/hpgmg/src/816c684bef70c9ab6eb93f94ca80709003bd776a/finite-element/tensor.c?at=master&fileviewer=file-view-default#tensor.c-68

>> P.S. Jed, if I just want to take the default problem and scale it up in size (for some simple parallel performance tests), is using -da_refine <some number> and a Jacobi smoother for the various levels reasonable?  Or do I need to do something more sophisticated?  (Sorry if this requires another thread.)

The paper shows how bjacobi/icc with a Krylov smoother performs much
better for this example with difficult configurations.  (I don't recall
testing chebyshev-bjacobi/icc at that time; it may work well.)  Some
examples in the runex48* targets and in the paper repository I pointed
you to before.  But if you don't care about using the fastest algorithms
for this problem, feel free to use whatever smoother you feel like.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160509/4d4069aa/attachment.sig>


More information about the petsc-dev mailing list