<div dir="ltr">attached the patch for ts ex2.c to reproduce the problem.<div>It runs 30 times the same TSSolve with a TS that has a RHSJacobian and BEULER as a solver.<div>This are the times for each solve on my workstation<br><div><div><br></div><div>[szampini@localhost tutorials]$ ./ex2</div><div>0.164751</div><div>0.1406</div><div>0.148703</div><div>0.158375</div><div>0.169456</div><div>0.172364</div><div>0.179924</div><div>0.186967</div><div>0.195149</div><div>0.202559</div><div>0.214942</div><div>0.217264</div><div>0.225801</div><div>0.232413</div><div>0.240205</div><div>0.249077</div><div>0.256062</div><div>0.262738</div><div>0.270429</div><div>0.277631</div><div>0.285879</div><div>0.292678</div><div>0.299828</div><div>0.307717</div><div>0.315533</div><div>0.323094</div><div>0.330388</div><div>0.338611</div><div>0.345624</div><div>0.35268</div></div><div><br></div><div>You can see that timings (for the same exact solve) increase. If I comment out DMCoarsenHookAdd in SNESSetUpMatrices</div><div><br></div><div>[szampini@localhost tutorials]$ git diff /home/szampini/src/petsc/src/snes/interface/</div><div>diff --git a/src/snes/interface/snes.c b/src/snes/interface/snes.c</div><div>index d366a2cc69..cdb7571869 100644</div><div>--- a/src/snes/interface/snes.c</div><div>+++ b/src/snes/interface/snes.c</div><div>@@ -642,7 +642,7 @@ PetscErrorCode SNESSetUpMatrices(SNES snes)</div><div>     KSP ksp;</div><div>     ierr = SNESGetKSP(snes,&ksp);CHKERRQ(ierr);</div><div>     ierr = KSPSetComputeOperators(ksp,KSPComputeOperators_SNES,snes);CHKERRQ(ierr);</div><div>-    ierr = DMCoarsenHookAdd(snes->dm,DMCoarsenHook_SNESVecSol,DMRestrictHook_SNESVecSol,snes);CHKERRQ(ierr);</div><div>+    //ierr = DMCoarsenHookAdd(snes->dm,DMCoarsenHook_SNESVecSol,DMRestrictHook_SNESVecSol,snes);CHKERRQ(ierr);</div><div>   }</div><div>   PetscFunctionReturn(0);</div><div> }</div><div><br></div><div>this is what I get, constant timings as expected</div><div><br></div><div><div>[szampini@localhost tutorials]$ ./ex2</div><div>0.154417</div><div>0.125632</div><div>0.125743</div><div>0.126303</div><div>0.125648</div><div>0.125593</div><div>0.125647</div><div>0.125656</div><div>0.125705</div><div>0.125705</div><div>0.125737</div><div>0.125648</div><div>0.125592</div><div>0.125568</div><div>0.125578</div><div>0.125678</div><div>0.125628</div><div>0.126056</div><div>0.125725</div><div>0.127705</div><div>0.126028</div><div>0.125671</div><div>0.125675</div><div>0.125662</div><div>0.125688</div><div>0.125767</div><div>0.12574</div><div>0.125604</div><div>0.125568</div><div>0.1256</div><div><br></div></div></div></div></div>