[petsc-users] KSPSetUp hanging up with HYPRE preconditioner
Matthew Knepley
knepley at gmail.com
Fri Aug 8 13:26:20 CDT 2014
On Fri, Aug 8, 2014 at 1:19 PM, Ghosh, Swarnava <sghosh2012 at gatech.edu>
wrote:
> 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.
>
> 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
>
To me it sounds like Hypre is not "hanging up", but "taking a long time".
Hypre can have a large setup time compared to some
other types of MG, for example agglomeration. You could compare using
-pc_type gamg.
Thanks,
Matt
> Thanks,
> Swarnava
>
>
> --
> Swarnava Ghosh
> PhD Candidate,
> Structural Engineering, Mechanics and Materials
> School of Civil and Environmental Engineering
> Georgia Institute of Technology
> Atlanta, GA 30332
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140808/c8845fec/attachment.html>
More information about the petsc-users
mailing list