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






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






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   compact0
watchminutes   dimensions0
  distributionCONSTANT
  group typeSCALAR
  timelevels1
 variable typeREAL




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 
   

Scheduled Functions

CCTK_WRAGH

  terminationtrigger_starttimer

  start timer

 

 Language:c
 Type: function

CCTK_POST_RECOVER_VARIABLES

  terminationtrigger_resetminutes

  reset watchtime

 

 Language:c
 Options: global
 Type: function

CCTK_ANALYSIS

  terminationtrigger_checkwalltime

  check elapsed job walltime

 

 Language:c
 Type: function

CCTK_WRAGH (conditional)

  terminationtrigger_createfile

  create termination file

 

 Language:c
 Type: function

CCTK_ANALYSIS

  terminationtrigger_checkfile

  check termination file

 

 Language:c
 Type: function