Checkpointing using algorithm 799 - #19
Open
rvuchkov007 wants to merge 11 commits into
Open
Conversation
std::string::ends_with is C++20; the build uses -std=c++17, so replace the two uses in importSensorsFromFiles with an equivalent compare(). Also refreshes 20 regression baselines that gained a mesh-construction log line from the current Trilinos version.
…for the standalone adjoint path
- num_steps was rounded from (final_time-initial_time)/deltat instead of counted the way transientSolver's loop counts, so a delta t that does not divide the interval reversed the wrong number of steps - guard on maxnumsteps/maxnumstages as well as numsteps/numstages: BDF2 with a BDF1 startup leaves numsteps at 1 while maxnumsteps stays 2, which sized the history handed to the adjoint solver out of bounds - reset the cached Jacobian at each forward/adjoint transition: the sweep alternates operators, so with reuse Jacobian on the adjoint solve was reusing the forward matrix
- unit test returns 0 or 1 rather than the raw failure count, which POSIX truncates to 8 bits - guard against int overflow in the schedule action limit - simulate the driver's slot bookkeeping in the unit test, so a next() that keeps every count right but hands back the wrong slot is caught - assert beta's zero and negative argument conventions, which the three-case placement rule depends on - cover all three branches of placementOffset with literals; both existing ones landed in the same branch - document beta's exact domain and correct the member doc for num_checkpoints_stored_, which described the 1-based MATLAB convention - restore the banner comments and the original author's note dropped during the takeForwardStep extraction
Contributor
|
Great to see check-pointing making it's way in. One comment I wanted to make is that |
rvuchkov007
requested review from
GrahamBenHarper
and removed request for
TimWildey
August 24, 2026 18:54
Newer Trilinos versions no longer print 'CubeHexMesh: Building sub cells' when the mesh is built, so gold files that carry the line start failing as soon as Trilinos is updated. Twenty gold files on this branch had picked it up. Filter the line in clean_log next to the existing IOSS filter and drop it from the gold files, so the tests pass with either Trilinos. Checked against Trilinos 17.1.1, which does not print it: maxwell/PlaneWave and thermal/2D_transient_checkpointed_adjoint both pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented Algorithm 799, along with unit tests, and verifications
Algorithm 799 implementation
src/tools/revolve.hpp
Unite tests
unit_tests/checkpointing/revolve.cpp
unit_tests/checkpointing/CMakeLists.txt
Changes
SolverManager::takeForwardStep
SolverManager::checkpointedAdjointModel
regression/thermal/2D_transient_checkpointed_adjoint/ -- end-to-end test.