Jed, can you please take a look at this? I don't have any experience on multilevel SNES and I don't know what is the proper fix
https://bitbucket.org/petsc/petsc/src/40b9351e49c32bd0ef34d75e511ace44084621e9/src/snes/interface/snes.c?at=master&fileviewer=file-view-default#snes.c-645 2017-09-25 18:37 GMT+03:00 Stefano Zampini <[email protected]>: > Jed, > > 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? > -- > Stefano > -- Stefano
