[petsc-users] PETSc log
Mark Adams
mfadams at lbl.gov
Sat Apr 10 11:56:58 CDT 2021
You can use -log_view and not change your code instead of adding this (this
is the first time I have seen PetscLogDefaultBegin).
The default PETSc timers will give you data on parts of the GAMG setup.
(look for "GAMG" and PAPt). There is also a line in the log data for
KSPSetup. This is mostly GAMG setup.
The tricky part is getting the solve time without the setup. You can call
KSPSetup(ksp) to get pure solve times in the KSPSolve line.
The next step, if you like, is to create a timer (PetscLogEventRegister)
and then Begin and End that event around a KSPSetup, or PCSetup, call to
get a line in the log data with what you want, but that should be the same
as what is measured by PETSc.
On Sat, Apr 10, 2021 at 1:31 AM Majid Rasouli <maj.rasouli at gmail.com> wrote:
> Hi all,
>
> I want to solve a linear system using gamg and time the setup and solve
> phases. I have tried PetscLogDefaultBegin(). It prints many timings
> including KSPSetUp and KSPSolve. Is it accurate to only report these two
> timings for the setup and solve phases?
>
> Thanks,
> Majid.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210410/8f52d6ea/attachment.html>
More information about the petsc-users
mailing list