[petsc-users] Issue of mg_coarse_ksp not converge

Wenbo Zhao zhaowenbo.npic at gmail.com
Sun Oct 1 05:49:07 CDT 2017


Hi,

I met some questions when I use PETSC/SLEPC to solve two-group neutron
diffusion equations with finite difference method. The grid is 3*3*3, when
DOF on each points is 2. So the matrix size is 54*54.
It is generalized eigenvalue problem Ax=\lamda Bx, where B is diagonally
dominant matrix but not symmetry.
EPS is set as below,
 ierr = EPSSetProblemType(eps,EPS_GNHEP);CHKERRQ(ierr);¬
 ierr = EPSSetWhichEigenpairs(eps,EPS_LARGEST_REAL);CHKERRQ(ierr);¬

Krylovschur is used as eps sovler. GAMG is used as PC.
I tried agg_nsmooths and mg_coarse_ksp_type. Only non-smooths and preonly
is OK.


Test 1
$ make NCORE=1 runkr_nonsmooth
mpirun -n 1 ./step-41 \
   -st_ksp_type gmres  \
   -st_pc_type gamg -st_pc_gamg_type agg -st_pc_gamg_agg_nsmooths 0 \
   -st_ksp_view  -mata AMAT.dat -matb BMAT.dat \
   -st_mg_coarse_ksp_type preonly   -st_mg_coarse_ksp_monitor  \
   -eps_nev 1 -eps_ncv 10  -eps_monitor  -log_view > log_nonsmooth 2>&1

Test 2
$ make NCORE=1 runkr_smooth
mpirun -n 1 ./step-41 \
   -st_ksp_type gmres  \
   -st_pc_type gamg -st_pc_gamg_type agg -st_pc_gamg_agg_nsmooths 1 \
   -st_ksp_view  -mata AMAT.dat -matb BMAT.dat \
   -st_mg_coarse_ksp_type preonly   -st_mg_coarse_ksp_monitor  \
   -eps_nev 1 -eps_ncv 10  -eps_monitor -log_view > log_smooth 2>&1
makefile:43: recipe for target 'runkr_smooth' failed
make: *** [runkr_smooth] Error 91

Test 3
$ make NCORE=1 runkr_gmres
mpirun -n 1 ./step-41 \
   -st_ksp_type gmres  \
   -st_pc_type gamg -st_pc_gamg_type agg -st_pc_gamg_agg_nsmooths 0 \
   -st_ksp_view  -mata AMAT.dat -matb BMAT.dat \
   -st_mg_coarse_ksp_type gmres  -st_mg_coarse_ksp_monitor
-st_mg_coarse_ksp_rtol 1.0e-6 \
   -eps_nev 1 -eps_ncv 10  -eps_monitor  -log_view > log_gmres 2>&1
makefile:59: recipe for target 'runkr_gmres' failed
make: *** [runkr_gmres] Error 91

Log files were attched.
The matrix file were also attched as AMAT.dat and BMAT.dat.

Is it correct? Or something wrong with my code or commad-line?

Thanks!

Wenbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171001/d7782135/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.tgz
Type: application/x-gzip
Size: 123841 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171001/d7782135/attachment-0001.tgz>


More information about the petsc-users mailing list