[petsc-dev] Discussion about time-dependent optimization moved from PR

Jed Brown jed at jedbrown.org
Tue Oct 17 10:55:19 CDT 2017


Stefano Zampini <stefano.zampini at gmail.com> writes:

>> >> have you thought about how to fix this?
>> >>
>> >> https://lists.mcs.anl.gov/pipermail/petsc-dev/2017-October/021387.html
>>
>> I feel like I'm missing context.  I know I failed to follow up in a
>> thread at some time in the past, but I don't really understand the
>> problem or what is being attempted.  What is the failing test case?
>>
>>
> There's no failing test; however, you can see considerable slow downs when
> calling TSSolve on the same ts multiple times. Just copying and paste the
> original mail message below: it seems clear to me the code path. However,
> what it's not clear is why we need to call DMCoarsenHookAdd so many times.
> Cannot be set once?
>
> 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.

What is "the patched code"?  I can't test whether a fix works without
being able to run something.  Since you have encountered this in actual
code, I'm asking you to provide a test case that I can run to see this
effect and to confirm if I fix it.  Put it in a branch and make a PR
with me responsible.  It's work you've clearly done in some form and I
shouldn't have to reproduce, especially when I don't get huge blocks of
time to work on PETSc and have plenty of research-critical tasks (in
PETSc and otherwise) that I'm unable to get to.


More information about the petsc-dev mailing list