Detach solver statistics save from data save, and always save - #1737
Conversation
Yuriyzabegaev
left a comment
There was a problem hiding this comment.
Thumbs up for this change! I find it very logical to split data save and statistics save.
I have 2 concerns:
-
Can I still disable statistics writing, or is it always on? We might want to disable it for unrelated tests to avoid spamming with statistics files.
-
Soon on the way is the sequential nonlinear solver, that will call
before_nonlinear_*andafter_nonlinear_*multiple times per time step. Imagine poromechanics splitting, there will be 2 newton solvers inside. Each might want to have its own statistics, which will conflict with this logic. This is fine by now, but will require rethinking of who is responsible for writing solver statistics. Let's keep this in mind.
As before, if not providing "solver_statistics_file_name" in the model parameters, no statistics file is writtin to file. So in most test, no solver statistics should be written, I presume only in the solver statistics tests and some workflow tests (I did not check the test suite).
Can't wait to use this :) I see how this can make things complicated. Comments:
|
8a5247a to
2029902
Compare
Yuriyzabegaev
left a comment
There was a problem hiding this comment.
Looks good! I just removed extra pass to restore how it was before.
Proposed changes
This PR suggests to detach saving solver statistics from solving data. While the latter only is performed after successful simulation (of a single time step for instationary simulations), the former shall be always performed, including after the simulation. This makes ensures that the solver statistics is up-to-date even in case of a failing simulation. In part related to #1421 and #1471.
Types of changes
What types of changes does this PR introduce to PorePy?
Put an
xin the boxes that apply.Checklist
Put an
xin the boxes that apply or explain briefly why the box is not relevant.pytestwas run with the--run-skippedflag.