TerminationTrigger

Cactus Maintainers <cactusmaint@cactuscode.org>

January 11, 2010

Abstract

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.

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

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




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



3 Interfaces

General

Implements:

terminationtrigger

Grid Variables

3.0.1 PRIVATE GROUPS




  Group Names    Variable Names    Details   




watchminutes watchminutes   compact0
  dimensions0
  distributionCONSTANT
  group typeSCALAR
  timelevels1
 variable typeREAL




triggered triggered   compact0
  dimensions0
  distributionCONSTANT
  group typeSCALAR
  timelevels1
 variable typeINT




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

 

Always:  
watchminutes triggered 
   

Scheduled Functions

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