[petsc-dev] CheckPointer
Jed Brown
jedbrown at mcs.anl.gov
Wed Sep 11 11:01:11 CDT 2013
Dave May <dave.mayhem23 at gmail.com> writes:
> Hey Jed,
>
> The overhead is big.
> Here are some numbers I generated which prompted Matt's email.
>
> All the total run times reported are almost entirely associated with matrix
> assembly.
> All builds used --with-debugging=yes
>
> Time (sec): 6.285e+00 [petsc v3.2]
> Time (sec): 1.966e+02 [petsc v3.4]
> Time (sec): 8.960e+00 [petsc v3.4 with a hacked checkptr.c which
> skips the checking]
>
> Calls to MatSetValue 5955066
> Calls to MatSetValues 11910132
Would removing the check only in MatSetValues be good enough? Probably
a better alternative to my earlier suggestion would be
PetscCheckPointerPushFastRegion()
all the normal checks, possibly nested
PetscCheckPointerPopFastRegion()
Those would be inline functions that just increment and decrement a
global counter and PetscCheckPointer would only do the expensive check
when the counter was equal to 0. And we can still have the run-time
parameter that checks "always" or "never".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130911/b37ded42/attachment.sig>
More information about the petsc-dev
mailing list