Skip to content

3_Restarting_a_run

Robert Sawko edited this page Mar 16, 2021 · 6 revisions

Let's do a follow up of test_1.

Go back to ${PROJECTS}, edit the prepare_directory.sh script so that it will create a directory named test_2 and source it:

source ./prepare_directory.sh

If we want to continue test_1, we may use the same parameters (perhaps with one or two exceptions):

cp ../test_1/*in .

Let us copy in our current Restart folder the quicksaves that will be used as initial conditions:

cp ../test_1/CheckPoints/* Restart/.

Finally, let us modify coral.parameters.in so that to restart from a quicksave: parameter 15 should be .True.. Now use the same mpiexec command as before and the simulation should restart successfully.



Modifying the resolution while continuing a run can be useful: one may increase the resolution to check convergence; conversely, one may decrease resolution after a brutal transient has passed and the system settles in some perhaps less demanding dynamics. In order to do that, the quicksave resolution must be adapted. We describe below how to proceed.

Suppose that you have created ${PROJECTS}/test_3 that continues ${PROJECTS}/test_2. Change your current directory to ${PROJECTS}, where you should have copied the python script ${CORAL}/etc/manage_dataDir_scripts/interpolate_checkpoints.py. The call syntax is:

python interpolate_checkpoints.py old_folder/ new_folder/ newNXAA newNYAA newNZAA

where old_folder/ and new_folder/ would be test_2/ and test_3/ in our example, and newNXAA, newNYAA, newNZAA are the new values for the resolution expressed in grid points (i.e. larger than the number of modes by a factor 3/2). For instance:

python interpolate_checkpoints.py test_2/ test_3/ 192 192 192

Next, modify ./test_3/coral.parameters.in so that the number of modes is consistent with the number of grid points:

0           ! ........... RESOLUTION ............ !
128         ! 01 ! (INT) ... along X         ! 01 !
128         ! 02 ! (INT) ... along Y         ! 02 !
128         ! 03 ! (INT) ... along Z         ! 03 !

You can now start test_3 to continue in time the solution found in test_2, but with a better resolution.