[petsc-users] Program spends a large amount of time in PetscStrcmp and PetscCheckPointer - Why?
Jacob Faibussowitsch
jacob.fai at gmail.com
Thu Jan 21 06:37:38 CST 2021
> PetscCheckPointer (for a total runtime
> of 21000 s) when running it on four threads. I do not recall using those
> functions actively, especially for PetscStrcmp.
PetscCheckPointer() is one of a chain of sanity-check functions called in the preambles to most petsc functions — see PetscValidIntPointer() for example — when PETSc is configured with debugging turned on. You can turn this off even for debugging builds by running with the option:
-check_pointer_intensity 0
PetscStrcmp() is similarly used in these preambles to check that two PETSc objects are of the same type (since the type is stored as a string), see PetscObjectTypeCompare(), usually called from PetscValidHeaderSpecific() or PetscCheckTypeNames().
Best regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391
> On Jan 21, 2021, at 07:09, Roland Richter <roland.richter at ntnu.no> wrote:
>
> Hei,
>
> I noticed while benchmarking and profiling that my program spends ~2800
> s in PetscStrcmp and ~2300 s in PetscCheckPointer (for a total runtime
> of 21000 s) when running it on four threads. I do not recall using those
> functions actively, especially for PetscStrcmp. The first function which
> is doing something useful (i.e. I know where it is in use) is zgemv_,
> with 574 s total runtime. Why are those functions called, and where are
> they necessary?
>
> Thanks!
>
> Regards,
>
> Roland Richter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210121/a4818e1e/attachment.html>
More information about the petsc-users
mailing list