5.2.3.2. Restart Database
This example shows how to restart a problem in Aria using a Restart Data block. Unlike IC Based Restart, the restart data approach restarts not only the ICs, but recreates the exact state of the problem contained in the database. It also builds on the example case built up in the Sierra 100 tutorial.
5.2.3.2.1. Problem Files
The files required for this example can be downloaded here, or found at $TESTS/aria_rtest/example/training/dbRestart (where TESTS=/projects/sierra/tests in a CEE environment, or your Sierra test distribution otherwise).
Note
In the present examples, the end_time is arbitrarily set as an aprepro variable. In practice, this is determined by external factors e.g. timeouts on HPC queues.
5.2.3.2.2. Input Deck Modification
First, we inform Aria that it can handle restart automatically. This means that Aria will search for the input database, and restart to the latest available time if available. Otherwise it will start a new simulation.
$---------------------------------------------------
$ Allow Aria to handle restart automatically
$---------------------------------------------------
# Scope: Sierra
restart = auto
# If a specific time of an existing database is required,
# it can be set here in place of automatic restart
#restart time = 300.0 #seconds
Alternatively, the restart time can be explicitly set if a restart database already exists.
Most of the time, restart is used when a simulation is terminated before its desired end time. Considering this, we can set the Exists = Append behavior in our results output to append the existing database. This yields a continuous dataset across restarts.
$---------------------------------------------------
$ Define contents of output files
$---------------------------------------------------
# Scope: Sierra > Procedure > Aria Region
Begin Results Output AriaOutput
...
Exists = Append
End Results Output AriaOutput
...
# Scope: Sierra > Procedure > Aria Region
Begin Restart Data RestartOutput
Input Database Name = heat_cond.rsA
Output Database Name = heat_cond.rsA
At Step 0 Increment = 1
Cycle Count = 5
End Restart Data RestartOutput
Finally, we inform Aria that it must read/write the restart data. Note that there are various ways to reduce the overall space taken by these restart databases. In the current example, the database retains only the last 5 steps.
Note
Each instance of restart will by default append a .e-sXXXX extension if necessary to generate a unique file name. In this way, previous restart databases will not be overwritten.