| 1004 | | 1. Each application script handles the SIGTERM signal sent by the [wiki://Workshops/JobCheckpointing/Examples#CheckpointRunner Checkpoint Runner] job immediately before that job times out. |
| 1005 | | 2. Each application script performs its own periodic '''checkpointing''' or saving intermediate or partial results, periodically. |
| 1006 | | 3. Each application script resumes from the most recently recorded checkpoint, if any, when invoked by the [wiki://Workshops/JobCheckpointing/Examples#CheckpointRunner Checkpoint Runner]. |
| 1007 | | |
| 1008 | | === Make copies of the BASH scripts checkpoint_submitter.sh and checkpoint_runner.sh |
| | 1004 | 1. Each application script handles the '''SIGTERM signal''' sent by the [wiki://Workshops/JobCheckpointing/Examples#CheckpointRunner Checkpoint Runner] job immediately before that job times out. |
| | 1005 | 2. Each application script performs its own '''periodic checkpointing''' or saving intermediate or partial results, periodically. |
| | 1006 | 3. Each application script '''resumes''' from the most recently saved checkpoint, if any, when invoked by the [wiki://Workshops/JobCheckpointing/Examples#CheckpointRunner Checkpoint Runner]. |
| | 1007 | 4. Each application script uses the following settings in the form of '''BASH environment variables''' (see [https://wiki.hpc.tulane.edu/trac/wiki/cypress/WorkingOnClusters#EnvironmentVariables Environment Variables]) with default values that can be overridden beforehand or at time of submittal of the [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] job script. (See [wiki://Workshops/JobCheckpointing/Examples#Overridingdefaultsettings Overriding default settings].) |
| | 1008 | * '''CKPT_PATH''' - file path of checkpoint value (default varies) |
| | 1009 | * '''CHECKPOINT_EVERY''' - number of loop iterations between periodic checkpoints (defaults to 20) |
| | 1010 | * '''MAX_ITER''' - maximum number of loop iterations to perform (defaults to 500) |
| | 1011 | |
| | 1012 | === Make copies of the BASH and Python scripts === |
| | 1013 | |
| | 1014 | To use any of the checkpointing examples mentioned below, you'll need to make your own copies of the required BASH and Python scripts in your own environment on Cypress. |
| | 1015 | |
| | 1016 | ==== Make copies of the BASH scripts checkpoint_submitter.sh and checkpoint_runner.sh ==== |