[petsc-dev] Behaviour of PetscLogEventGetId() and PetscLogStageGetId()
Dave May
dave.mayhem23 at gmail.com
Fri Jun 19 03:54:50 CDT 2015
I was wondering why there is different behaviour between
PetscLogEventGetId()
and
PetscLogStageGetId()
PetscLogEventGetId() returns -1 if the event isn't found,
whilst PetscLogStageGetId() throws an error if the stage isn't found.
My use case is that within one of my custom preconditioners, I wanted
to call PetscLogStageRegister() during the creation phase, but obviously
I can only register the stage once. To enable multiple instances of the
preconditioner to exist, I need to ensure that the stage is only registered
once.
Hence I would like to check for the existence of the stage prior to calling
the register function.
Is there currently a way to check for the existence of a registered stage?
Cheers
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150619/45b34441/attachment.html>
More information about the petsc-dev
mailing list