[petsc-users] advice on different performance using hypre:euclid through petsc vs directly through hypre

Matt Funk matze999 at gmail.com
Sun Nov 13 00:34:22 CST 2011

i am solving a system for which is interfaced both with petsc and hypre.
I.e. i have some data and build the matrix up either via petsc or hypre
(for hypre i use the sstruct interface). The output of the system after
several hundred timestep is only different on the order of 1e-04 for a
non-linear system. So in terms of accuracy things agree pretty well such
that i think i can rule out that the issue is related to the matrix itself.

 Anyway, for both interfaces i am using the Euclid/BiCGSTAB combination
(rel.tol. 1e-08). I would expect similar results in terms of performance
which i do not get.
For PETSC:HYPRE_EUCLID:BICGSTAB for the first 10 timesteps i get 12
iterations per timestep. Using HYPRE directly i get convergence after 3
iterations. At first the it seems like the tolerance is the issue. I get
the residuals and iterations as follows:
HYPRE_SStructBiCGSTABGetNumIterations(m_SStruct->ssSolver, &a_iterations);
m_ierr = KSPGetIterationNumber(m_ksp, &a_iterations_solver);
m_ierr = KSPGetResidualNorm(m_ksp, &a_relres_solver);
Other than that i do change the type of norm or anything.

The residual using HYPRE is on the order of 1e-09
The residual using PETSC is on the order of 1e-04

So not only dies HYPRE use less iterations, it also gives the smaller

I think this is a user error as i cannot really explain why there would be
such a vast difference. I was just wondering if anyone has any insight as
to what else i could try or an attempt at some explanation as to what i am

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111112/3f330e3c/attachment.htm>

More information about the petsc-users mailing list