[petsc-users] Suspect Poor Performance of Petsc
Matthew Knepley
knepley at gmail.com
Thu Nov 17 09:42:05 CST 2016
On Thu, Nov 17, 2016 at 6:28 AM, Ivano Barletta <ibarletta at inogs.it> wrote:
> Dear Petsc users
>
> My aim is to replace the linear solver of an ocean model with Petsc, to
> see if is
> there place for improvement of performances.
>
> The linear system solves an elliptic equation, and the former solver is a
> Preconditioned Conjugate Gradient, with a simple diagonal preconditioning.
> The size of the matrix is roughly 27000
>
> Prior to nest Petsc into the model, I've built a simple test case, where
> the same system is solved by the two of the methods
>
> I've noticed that, compared to the former solver (pcg), Petsc performance
> results are quite disappointing
>
For any solver performance questions, we need to see the output of
-ksp_monitor -ksp_view -ksp_converged_reason -log_view
If you are comparing to another solver, we also need to know exactly what
is being
done there, including how the convergence tolerance is implemented.
This problem is extremely small. I would be really surprised if you can
beat a direct
solver like SuperLU (--download-superlu) and parallelism should be largely
ineffective.
However, that depends on how accurately you are solving the system.
Thanks,
Matt
> Pcg does not scale that much, but its solution time remains below
> 4-5e-2 seconds.
> Petsc solution time, instead, the more cpu I use the more increases
> (see output of -log_view in attachment ).
>
> I've only tried to change the ksp solver ( gmres, cg, and bcgs with no
> improvement) and preconditioning is the default of Petsc. Maybe these
> options don't suit my problem very well, but I don't think this alone
> justifies this strange behavior
>
> I've tried to provide d_nnz and o_nnz for the exact number of nonzeros in
> the
> Preallocation phase, but no gain even in this case.
>
> At this point, my question is, what am I doing wrong?
>
> Do you think that the problem is too small for the Petsc to
> have any effect?
>
> Thanks in advance
> Ivano
>
>
--
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/20161117/3652b88f/attachment.html>
More information about the petsc-users
mailing list