xx TerminationTrigger

TerminationTrigger

Cactus Maintainers <cactusmaint@cactuscode.org>

January 11, 2010

Abstract

This thorn watches the elapsed walltime. If only 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.

1 Using This Thorn

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 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.)

1.1 Obtaining This Thorn Available as part of the Cactus Computational Toolkit in arrangement CactusUtils.

1.2 Support and Feedback To the Cactus Team at cactusmaint@cactuscode.org or through the Bug/Feature Request web pages at

www.cactuscode.org.

2 Parameters

11 checkxfilexevery 10 Scope: private01 INT

11 Description: Check termination file every n timesteps

11  Range  10              01  Default: 1

11 1:*  10

11

11 createxterminationxfile  10 Scope: private01  BOOLEAN

11 Description: Create an empty termination file at startup

11                          10              01  Default: no

11

11 maxxwalltime  10 Scope: private01  REAL

11 Description: Walltime in HOURS allocated for this job

11 Range 10 01 Default: 0.0
11 0.0  10 Don’t trigger termination
11 (0.0:*  10 Should be positive, right

11

11 onxremainingxwalltime  10 Scope: private01  REAL

11 Description: When to trigger termination in MINUTES

11 Range 10 01 Default: 0.0
11 0.0  10 Don’t trigger termination
11 (0.0:*  10 So many minutes before your job walltime is over

11 outputxremtimexeveryxminutes 10 Scope: private01  REAL

11 Description: Output remaining wall time every n minutes

11 Range 10 01 Default: 60.0
11 0.0  10 No output
11 (0.0:*  10 Output

11

11 signalxnames  10 Scope: private01  KEYWORD

11 Description: which signal to trigger on

11 Range 10 01 Default: (none)
11 SIGHUP  10 hangup on controlling terminal
11 SIGINT  10 interrupt from keyboard
11 SIGTERM  10 termination signals, often used by queueing systems to request shutdown
11 SIGUSR1  10 user signal 1
11 SIGUSR2  10 user signal 2
11                          10 do not listen to signals

11

11 signalxnumbers  10 Scope: private01  INT

11 Description: which signal to trigger on, used only if signalxnamees is empty

11 Range 10 01 Default: (none)
11 1:*  10 any signal number understood by the OS
11                          10 ignore this slot

11

11 terminationxfile  10 Scope: private01  STRING

11 Description: Termination file name (either full path or relative to IO::outxdir)

11 Range 10 01 Default: /tmp/cactusxterminate
11                          10 Termination file

11

11 terminationxfromxfile  10 Scope: private01  BOOLEAN

11 Description: Use termination file; specified by terminationxfilename

11                          10              01  Default: no

11

11 testsuite  10 Scope: private01  BOOLEAN

11 Description: manually trigger termination

11                          10              01  Default: no

11

11 outxdir  10 Scope: shared from IO01STRING

11

3 Interfaces General Implements: terminationtrigger

Grid Variables

3.0.1 PRIVATE GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 watchminutes 10 watchminutes 01 compact 11 0
11                    10                    01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 triggered 10 triggered 01 compact 11 0
11                    10                    01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 INT

11

4 Schedule 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.

Storage

11 Always:  11 x
11 watchminutes triggered 11 x

11 x  11 x

11

Scheduled Functions

CCTKxPARAMCHECK x terminationtriggerxparamcheck x check consitency of parameters x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxBASEGRID x terminationtriggerxresettrigger x clear trigger state x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxBASEGRID x terminationtriggerxstarttimer x start timer x

11 x 11 Language: 11 c
11 x 11 Type:  11 function
11 x 11 Writes: 11 terminationtrigger::watchminutes(everywhere)

11

CCTKxPOSTxRECOVERxVARIABLES x terminationtriggerxresetminutes x reset watchtime x

11 x 11 Language: 11 c
11 x 11 Options: 11 global
11 x 11 Type:  11 function
11 x 11 Writes: 11 terminationtrigger::watchminutes(everywhere)

11

CCTKxANALYSIS x terminationtriggerxcheckwalltime x check elapsed job walltime

11 x 11 Language: 11 c
11 x 11 Reads:  11 terminationtrigger::watchminutes(everywhere)
11 x 11 Type:  11 function
11 x 11 Writes: 11 terminationtrigger::watchminutes(everywhere)

11

CCTKxSTARTUP x terminationtriggerxstartsignalhandler x start signal handler x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxANALYSIS x terminationtriggerxchecksignal x check if we received a termination signal x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxBASEGRID (conditional) x terminationtriggerxcreatefile x create termination file x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxANALYSIS x terminationtriggerxcheckfile x check termination file x

11 x 11 Language: 11 c
11 x 11 Type:  11 function