This thorn watches the elapsed walltime. If only \(n\) minutes are left before the some limit set by the user, it triggers termination of the simulation. Termination is also triggered if a special file with a special content exists.
To use this thorn you only need to include it in your ActiveThorns parameter and set the relevent parameters. With default parameters the thorn does nothing.
Current options are to gracefully terminate a simulation \(n\) minutes before a set time limit, or to terminate a simulation when the user creates a certain file. The latter is one of a few possibilities to order a Cactus simulation to terminate from the outside while giving it time to checkpoint. (Another possibility is to use the web interface for this.)
Available as part of the Cactus Computational Toolkit in arrangement CactusUtils.
To the Cactus Team at cactusmaint@cactuscode.org or through the Bug/Feature Request web pages at www.cactuscode.org.
check_file_every | Scope: private | INT |
Description: Check termination file every n timesteps
| ||
Range | Default: 1 | |
1:* | ||
create_termination_file | Scope: private | BOOLEAN |
Description: Create an empty termination file at startup
| ||
Default: no | ||
max_walltime | Scope: private | REAL |
Description: Walltime in HOURS allocated for this job
| ||
Range | Default: 0.0 | |
0.0 | Don’t trigger termination
| |
(0.0:* | Should be positive, right
| |
on_remaining_walltime | Scope: private | REAL |
Description: When to trigger termination in MINUTES
| ||
Range | Default: 0.0 | |
0.0 | Don’t trigger termination
| |
(0.0:* | So many minutes before your job walltime is over
| |
output_remtime_every_minutes | Scope: private | REAL |
Description: Output remaining wall time every n minutes
| ||
Range | Default: 60.0 | |
0.0 | No output
| |
(0.0:* | Output
| |
signal_names | Scope: private | KEYWORD |
Description: which signal to trigger on
| ||
Range | Default: (none) | |
SIGHUP | hangup on controlling terminal
| |
SIGINT | interrupt from keyboard
| |
SIGTERM | termination signals, often used by queueing systems to request
shutdown
| |
SIGUSR1 | user signal 1
| |
SIGUSR2 | user signal 2
| |
do not listen to signals
| ||
signal_numbers | Scope: private | INT |
Description: which signal to trigger on, used only if signal_namees is empty
| ||
Range | Default: (none) | |
1:* | any signal number understood by the OS
| |
ignore this slot
| ||
termination_file | Scope: private | STRING |
Description: Termination file name (either full path or relative to IO::out_dir)
| ||
Range | Default: /tmp/cactus_terminate | |
Termination file
| ||
termination_from_file | Scope: private | BOOLEAN |
Description: Use termination file; specified by termination_filename
| ||
Default: no | ||
testsuite | Scope: private | BOOLEAN |
Description: manually trigger termination
| ||
Default: no | ||
out_dir | Scope: shared from IO | STRING |
Implements:
terminationtrigger
Group Names | Variable Names | Details | |
watchminutes | watchminutes | compact | 0 |
dimensions | 0 | ||
distribution | CONSTANT | ||
group type | SCALAR | ||
timelevels | 1 | ||
variable type | REAL | ||
triggered | triggered | compact | 0 |
dimensions | 0 | ||
distribution | CONSTANT | ||
group type | SCALAR | ||
timelevels | 1 | ||
variable type | INT | ||
This section lists all the variables which are assigned storage by thorn CactusUtils/TerminationTrigger. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.
Always: | |
watchminutes triggered | |
CCTK_PARAMCHECK
terminationtrigger_paramcheck
check consitency of parameters
Language: | c | |
Type: | function | |
CCTK_BASEGRID
terminationtrigger_resettrigger
clear trigger state
Language: | c | |
Type: | function | |
CCTK_BASEGRID
terminationtrigger_starttimer
start timer
Language: | c | |
Type: | function | |
Writes: | terminationtrigger::watchminutes(everywhere) | |
CCTK_POST_RECOVER_VARIABLES
terminationtrigger_resetminutes
reset watchtime
Language: | c | |
Options: | global | |
Type: | function | |
Writes: | terminationtrigger::watchminutes(everywhere) | |
CCTK_ANALYSIS
terminationtrigger_checkwalltime
check elapsed job walltime
Language: | c | |
Reads: | terminationtrigger::watchminutes(everywhere) | |
Type: | function | |
Writes: | terminationtrigger::watchminutes(everywhere) | |
CCTK_STARTUP
terminationtrigger_startsignalhandler
start signal handler
Language: | c | |
Type: | function | |
CCTK_ANALYSIS
terminationtrigger_checksignal
check if we received a termination signal
Language: | c | |
Type: | function | |
CCTK_BASEGRID (conditional)
terminationtrigger_createfile
create termination file
Language: | c | |
Type: | function | |
CCTK_ANALYSIS
terminationtrigger_checkfile
check termination file
Language: | c | |
Type: | function | |