Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
253b90c1
Commit
253b90c1
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added description of the restart file related parameters to the RTD.
parent
6e883e98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/RTD/source/ParameterFiles/index.rst
+83
-3
83 additions, 3 deletions
doc/RTD/source/ParameterFiles/index.rst
with
83 additions
and
3 deletions
doc/RTD/source/ParameterFiles/index.rst
+
83
−
3
View file @
253b90c1
...
@@ -191,9 +191,9 @@ Physical Constants
...
@@ -191,9 +191,9 @@ Physical Constants
------------------
------------------
For some idealised test it can be useful to overwrite the value of
For some idealised test it can be useful to overwrite the value of
some physical constants
. I
n particular the value of the gravitational
some physical constants
; i
n particular the value of the gravitational
constant. SWIFT offers an optional parameter to overwrite the value of
constant. SWIFT offers an optional parameter to overwrite the value of
that constant.
:math:`G_N`.
.. code:: YAML
.. code:: YAML
...
@@ -206,7 +206,8 @@ Mpc, km/s) will mean that :math:`G_N=1` in these units [#f2]_ instead of the
...
@@ -206,7 +206,8 @@ Mpc, km/s) will mean that :math:`G_N=1` in these units [#f2]_ instead of the
normal value :math:`G_N=43.00927`.
normal value :math:`G_N=43.00927`.
This option is only used for specific tests and debugging. This entire
This option is only used for specific tests and debugging. This entire
section of the YAML file can typically be left out.
section of the YAML file can typically be left out. More constants may
be handled in the same way in future versions.
Snapshots
Snapshots
---------
---------
...
@@ -225,6 +226,85 @@ Statistics
...
@@ -225,6 +226,85 @@ Statistics
Restarts
Restarts
--------
--------
SWIFT can write check-pointing files and restart from them. The behaviour of
this mechanism is driven by the options int he `Restarts` section of the YAML
parameter file. All the parameters are optional but default to values that
ensure a reasonable behaviour.
* Wether or not to enable the dump of restart files: ``enable`` (default:
``1``).
This parameter acts a master-switch for the check-pointing capabilities. All the
other options require the ``enable`` parameter to be set to ``1``.
* Wether or not to save a copy of the previous set of check-pointing files:
``save`` (default: ``1``),
* Wether or not to dump a set of restart file on regular exit: ``onexit``
(default: ``0``),
* The wall-clock time in hours between two sets of restart files:
``delta_hours`` (default: ``6.0``).
Note that there is no buffer time added to the ``delta_hours`` value. If the
system's batch queue run time limit is set to 6 hours, the user must specify a
smaller value to allow for enough time to safely dump the check-point files.
* The sub-directory in which to store the restart files: ``subdir`` (default:
``restart``),
* The basename of the restart files: ``basename`` (default: ``swift``)
If the directory does not exist, SWIFT will create it. When resuming a run,
SWIFT, will look for files with the name provided in the sub-directory specified
here. The files themselves are named ``basename_000001.rst`` where the basenme
is replaced by the user-specified name and the 6-digits number corresponds to
the MPI-rank. SWIFT writes one file per MPI rank. If the ``save`` option has
been activated, the previous set of restart files will be named
``basename_000000.rst.prev``.
SWIFT can also be stopped by creating an empty file called ``stop`` in the
directory where the code runs. This will make SWIFT dump a fresh set of restart
file (irrespective of the specified ``delta_time`` between dumps) and exit
cleanly. One parameter governs this behaviour:
* Number of steps between two checks for the presence of a ``stop`` file:
``stop_steps`` (default: ``100``).
The default value is chosen such that SWIFT does not need to poll the
file-system to often, which can take a significant amount of time on distributed
systems. For runs where the small time-steps take a much larger amount of time,
a smaller value is recommended to allow for a finer control over when the code
can be stopped.
Finally, SWIFT can automatically stop after a specified amount of wall-clock
time. The code can also run a command when exiting in this fashion, which can be
used, for instance, to interact with the batch queue system:
* Maximal wall-clock run time in hours: ``max_run_time`` (default: ``24.0``),
* Whether or not to run a command on exit: ``resubmit_on_exit`` (default:
``0``),
* The command to run on exit: ``resubmit_command`` (default: ``./resub.sh``).
Note that no check is performed on the validity of the command to run. SWIFT
simply calls ``system()`` with the user-specified command.
To run SWIFT, dumping check-pointing files every 6 hours and running for 24
hours after which a shell command will be run, one would use:
.. code:: YAML
Restarts:
enable: 1
save: 1 # Keep copies
onexit: 0
subdir: restart # Sub-directory of the directory where SWIFT is run
basename: swift
delta_hours: 6.0
stop_steps: 100
max_run_time: 24.0 # In hours
resubmit_on_exit: 1
resubmit_command: ./resub.sh
Scheduler
Scheduler
---------
---------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment