[petsc-users] KSPSetUp hanging up with HYPRE preconditioner

Jed Brown jed at jedbrown.org
Fri Aug 8 13:27:59 CDT 2014


"Ghosh, Swarnava" <sghosh2012 at gatech.edu> writes:

> Hello,
>
>     I am using petsc 3.4.1 interfaced with hypre 2.9.0b
>     
>     I am using the following lines of code to solve a Poisson equation using KSPGMRES with HYPRE preconditioner.
>     pOfdft->laplaceOpr is a sparse matrix in MATMPIBAIJ format.   
>
>   KSPCreate(PETSC_COMM_WORLD,&pOfdft->ksp);  
>   KSPSetType(pOfdft->ksp,KSPGMRES);
>   KSPSetTolerances(pOfdft->ksp,KSPTOL,PETSC_DEFAULT,PETSC_DEFAULT,PETSC_DEFAULT);
>   KSPSetOperators(pOfdft->ksp,pOfdft->laplaceOpr,pOfdft->laplaceOpr,SAME_NONZERO_PATTERN);
>   KSPGetPC(pOfdft->ksp,&pOfdft->pc);  
>   PCSetType(pOfdft->pc,PCHYPRE);  
>   PCHYPRESetType(pOfdft->pc,"boomeramg");
>   KSPSetFromOptions(pOfdft->ksp);  
>   KSPSetUp(pOfdft->ksp);   
>        
>     The code runs fine when the size of matrix is small (4096 X 4096). 
>     BUT the code remains stuck in KSPSetUp function when the size of matrix is bigger (262144 x262144) on 64 cores 120 gb ram.

Use a debugger to get a stack trace of where it "hangs".

>    Could you please let me know the probable reason the why the code is hanging in KSPSetUp.
>    If possible could you please share some C examples where you use a HYPRE preconditioner for solving a large system

src/ksp/ksp/examples/tutorials/ex2.c

  ./ex2 -m 1000 -n 1000 -pc_type hypre -ksp_monitor

has a million degrees of freedom.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140808/99114388/attachment.pgp>


More information about the petsc-users mailing list