[petsc-dev] DMCoarsenHookAdd in SNESSetUpMatrices

Stefano Zampini stefano.zampini at gmail.com
Mon Sep 25 10:37:46 CDT 2017


Today I fought for several hours against a strange behaviour occuring when
reusing a TS for multiple solves. You can reproduce it by applying the
attached patch.

The issue is with DMCoarsenHookAdd called in SNESSetUpMatrices, and git
blames you ;-).

Every time you call TSGetRHSMats_Private, TSGetIJacobian gets called, which
in turns calls SNESSetUpMatrices, that adds the entry in the linked list of
hooks via DMCoarsenHookAdd. This causes a considerable slow down when using
the RHS interface with an implicit solver, as you can see from running the
patched code.

can you please take a look?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170925/7fb9d0f7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1321 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170925/7fb9d0f7/attachment.obj>

More information about the petsc-dev mailing list