Home > Legacy archive > User’s manual > Restart

A run can be restarted from any output fully written to the disk. For instance, if your run has produced outputs 0 to 96, you can restart it from output 53 or 95. If you wish to restart it from output 96, just make sure that this output has been fully written to the disk. In order to restart from output i, FARGO needs the three HD files gasdensi.dat, gasvradi.dat and gasvthetai.dat. It may complain that it does not find the gaslabeli.dat, even if you do not wish to advect a passive scalar (see LabelAdvection). In that case, just ignore this warning. It also needs the planet files planet0.dat, etc., with a valid line beginning with the output number for the restart. This tells FARGO where the planets are at restart, and what are their masses and velocities. If you have simply stopped or killed a run, or if a run has terminated normally, all these files exist and you don’t have to worry about their existence.

In order to restart a run from output 53, just issue:

FARGO reads the content of the parameter file inputfile.par. It then knows where to find the outputs (in the directory specified by the parameter OUTPUTDIR in that parameter file). It looks for output 53 and starts to iterate the hydro time steps if everything is fine, or issues an error message and quits otherwise.

Before launching a restart, you can edit some part of the parameter file, such as NTOT, DT or NINTERM. These are the most frequent cases: either you feel that the code could have continued past the last output and still produce some interesting results, in which case you increase the value of NTOT before restarting, or you observe an interesting behavior at some stage and you want to investigate it more in details with a smaller time sampling for the outputs, in which case you modify DT and/or NINTERM before launching the restart.

You can also modify the disk aspect ratio or flaring index: the sound speed profile will be modified accordingly, since there is no output file that contains the sound speed (or temperature) information. If you wish to add a planet or remove one, this is possible but relatively tricky: you must edit the planetconfig file that FARGO will read at restart. It expects to find as many planets in the output directory as specified in that planetary configuration file. For instance if you only had one planet, and wish to add one, you have to add it to the planetary configuration file, but also you have to create and edit by hand a file planet1.dat in the output directory. And vice-versa if you wish to remove one (you can only remove the last one of the planetary configuration file, or you need to reorder the file numbering of the planeti.dat files in the output directory).

You can only restart a run for which the output is available as if it was produced by a sequential run (see the -m flag). If this is not the case, you must concatenate the outputs from different CPUs as explained in the MPI implementation notes. This implies that you can restart a sequential run on a parallel platform, or vice-versa, or restart a run with a different number of processors. The restart feature is therefore relatively flexible.

Normally the output produced after a restart is undistinguishable from the output that would have been produced if the run had continued normally, without a stop and restart. The only difference is that the line in the planeti.dat file that contains the planet position at restart is duplicated, and added at the end of that file. Then at every output a line is added at the end of that file, that indicates the date, planet position, velocity, and mass, as for a normal (non restart) run. Therefore, if you restart a run at an earlier output than its last output, the date in the planeti.dat files are not monotonically increasing. It is useful to bear this in mind, when plotting the planet distance to the primary as a function of time, for instance.

Also note that if you restart a run at an earlier output than the last output, all subsequent output files of hydrodynamic quantities are overwritten, so the content of the corresponding files is lost. If you do not want to lose these files, you should copy them to another directory before launching the restart.

Site Map | COAST COAST | Contact | RSS RSS 2.0