[petsc-users] How rto use multigrid?

w_ang_temp w_ang_temp at 163.com
Mon Oct 29 07:49:36 CDT 2012

Hello, Jed
    I use the command:
    mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type gamg -pc_gamg_agg_nsmooths 1  -ksp_rtol 1.0e-15 -ksp_converged_reason
    The error is as follows:
[0]PETSC ERROR: --------------------- Error Message ------------------------------------
[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing external package needed for type
[0]PETSC ERROR: Unable to find requested PC type gamg!
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 7, Thu Mar 15 09:30:51 CDT 2012
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: ./ex4f on a arch-linu named ubuntu by geo Mon Oct 29 05:40:13 2012
[0]PETSC ERROR: Libraries linked from /home/geo/soft/petsc/petsc-3.2-p7/arch-linux2-c-opt/lib
[0]PETSC ERROR: Configure run at Mon Jul  2 20:33:17 2012
[0]PETSC ERROR: Configure options --with-mpi-dir=/home/geo/soft/mpich2 --download-f-blas-lapack=1 --with-x=1 --with-debugging=0 --download-parmetis --download-mumps --download-scalapack --download-blacs
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: PCSetType() line 67 in src/ksp/pc/interface/pcset.c
[0]PETSC ERROR: PCSetFromOptions() line 184 in src/ksp/pc/interface/pcset.c
[0]PETSC ERROR: KSPSetFromOptions() line 286 in src/ksp/ksp/interface/itcl.c
     When I use 'mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type sor -ksp_rtol 1.0e-15 -ksp_converged_reason', it is ok. So
what is the possible reason?

At 2012-10-28 22:25:31,"Jed Brown" <jedbrown at mcs.anl.gov> wrote:

Try the simple option I just sent.

On Oct 28, 2012 6:38 AM, "w_ang_temp" <w_ang_temp at 163.com> wrote:

Hello, Jed
    Thanks for your timely reply. I deal with the soil-water coupled problem in geotechnical engineering, 
whose stiffness matrix is ill-conditioned. I have did some work about it, mainly finding the effective
solvers and preconditioners. I used the command line option like this:
mpiexec -n 4 ./ex4f -ksp_type cgs -pc_type sor -ksp_rtol 1.0e-15 -ksp_converged_reason.
    So, I also want to use the multigrid just like the simple command. There is only a little introduction
about multigrid in the manual. Multigrid is complex and not a easy thing for me, so I just need to konw how
to use it simply in PETSc to solve the Ax=b system.

>At 2012-10-28 21:17:00,"Jed Brown" <jedbrown at mcs.anl.gov> wrote:

>Algebraic multigrid can be used directly, -pc_type gamg -pc_gamg_agg_nsmooths 1. Geometric either required that you use the PCMG interface to set >interpolation (and provide a coarse operator for non-Galerkin) or use a DM that provides coarsening capability.

>What kind of problem are you solving?

>>On Oct 28, 2012 6:09 AM, "w_ang_temp" <w_ang_temp at 163.com> wrote:

>>   I want to use the multigrid as a preconditioner. The introduction about it in the manual is little.
>>So are there some typical examples or details about multigrid? Is it used just like other preconditioners
>>like jacobi, sor, which can be simply used in the cammand line options?
>>   Thanks.
>>                                                                       Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121029/12b56747/attachment.html>

More information about the petsc-users mailing list