| 8 | | To run the example, see [wiki://Workshops/JobCheckpointing/Examples/BASH#RunningtheBASHcheckpointingexampleonCypress Running the BASH checkpointing example on Cypress] below. |
| 9 | | |
| 10 | | [[BR]] |
| 11 | | |
| 12 | | === checkpoint_signal_iter.sh === |
| | 8 | By default, the BASH checkpointing application behaves as follows. |
| | 9 | |
| | 10 | * checkpointing every 20 application iterations (one second per iteration) and |
| | 11 | * running a total of 500 iterations. |
| | 12 | |
| | 13 | == Running the BASH checkpointing example with defaults == |
| | 14 | |
| | 15 | To run the application on Cypress, perform the following. |
| | 16 | |
| | 17 | 1. Create your own versions of the following files in your current directory on Cypress. (For file editing with '''nano''' on Cypress, see [[https://wiki.hpc.tulane.edu/trac/wiki/cypress/FileEditingSoftware/Example|File Editing Example]].) |
| | 18 | |
| | 19 | * [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] |
| | 20 | * [wiki://Workshops/JobCheckpointing/Examples#checkpoint_runner.sh checkpoint_runner.sh] |
| | 21 | * [wiki://Workshops/JobCheckpointing/Examples#aggregate_usage.py aggregate_usage.py] |
| | 22 | * [wiki://Workshops/JobCheckpointing/Examples#plot_progress.py plot_progress.py] |
| | 23 | |
| | 24 | 2. Create your own version of the following BASH application script file '''checkpoint_signal_iter.sh'''. |
| 69 | | == Running the BASH checkpointing example on Cypress == |
| 70 | | |
| 71 | | To run the BASH checkpointing job example, defaulting to checkpointing every 20 application iterations and a total of 500 iterations, perform the following. |
| 72 | | |
| 73 | | 1. Create your own versions of the following files in your current directory on Cypress. (For file editing with '''nano''' on Cypress, see [[https://wiki.hpc.tulane.edu/trac/wiki/cypress/FileEditingSoftware/Example|File Editing Example]].) |
| 74 | | |
| 75 | | * [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] |
| 76 | | * [wiki://Workshops/JobCheckpointing/Examples#checkpoint_runner.sh checkpoint_runner.sh] |
| 77 | | * [wiki://Workshops/JobCheckpointing/Examples#aggregate_usage.py aggregate_usage.py] |
| 78 | | * [wiki://Workshops/JobCheckpointing/Examples#plot_progress.py plot_progress.py] |
| 79 | | * [wiki://Workshops/JobCheckpointing/Examples/BASH#checkpoint_signal_iter.sh checkpoint_signal_iter.sh] |
| 80 | | |
| 81 | | 2. Change permissions on the BASH application script, '''checkpoint_signal_iter.sh''' executable via the following command. |
| | 81 | 3. Change permissions on the BASH application script, '''checkpoint_signal_iter.sh''', making the script executable via the following '''chmod''' command. (See [wiki://cypress/BasicLinuxComands#chmod chmod].) |
| 145 | | === Listing of the final checkpoint submitter log - completed workflow === |
| 146 | | |
| 147 | | The following is the listing of the final log file, '''log_submitter_3303154.out''', generated by '''checkpoint_submitter.sh''' ending with "Workflow complete. Exiting submitter." |
| | 145 | === Sample checkpoint submitter logs === |
| | 146 | |
| | 147 | Here are the first and last instances from among the multiple log files generated by the sequence of jobs running the job script [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh]. |
| | 148 | |
| | 149 | The first job in the sequence was submitted by the user, and all other jobs thereafter in that sequence were submitted by the job script itself via '''self-restarting'''. |
| | 150 | |
| | 151 | ==== Listing of the initial checkpoint submitter log - starting workflow ==== |
| | 152 | |
| | 153 | Here is the listing of the first log file, '''log_submitter_3303140.out''', generated by [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] ending with the message "Submitter approaching timeout -> restarting self. Submitted batch job 3303142." |
| | 154 | |
| | 155 | |
| | 156 | {{{ |
| | 157 | [tulaneID@cypress2 ~]$cat log_submitter_3303140.out |
| | 158 | Info[20260401-17:44:05]: Start on cypress01-066; JOBID=3303140 |
| | 159 | Info[20260401-17:44:05]: Submitter settings: |
| | 160 | Info[20260401-17:44:05]: CKPT_PATH=state_iter_bash.txt |
| | 161 | Info[20260401-17:44:05]: MAX_ITER=500 |
| | 162 | Info[20260401-17:44:05]: RUNNER_SCRIPT=checkpoint_runner.sh |
| | 163 | Info[20260401-17:44:05]: SUBMITTER_MARGIN_SEC=60 |
| | 164 | Info[20260401-17:44:05]: SUBMITTER_TIME_LIMIT=3:30 |
| | 165 | Info[20260401-17:44:05]: No previous state found; starting fresh. |
| | 166 | Info[20260401-17:44:05]: Submitter cycle: 0 |
| | 167 | Info[20260401-17:44:05]: Current checkpoint iteration: 0 |
| | 168 | Info[20260401-17:44:05]: Submitted worker: 3303141 |
| | 169 | Info[20260401-17:44:05]: Waiting on first of worker 3303141 to finish or self-restart. |
| | 170 | Info[20260401-17:46:46]: Submitter approaching timeout -> restarting self |
| | 171 | Submitted batch job 3303142 |
| | 172 | }}} |
| | 173 | |
| | 174 | ==== Listing of the final checkpoint submitter log - completed workflow ==== |
| | 175 | |
| | 176 | Here is the listing of the final log file, '''log_submitter_3303154.out''', generated by [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] ending with the message "Workflow complete. Exiting submitter." |
| 180 | | |
| 181 | | === Listing of the final checkpoint runner log - completed application === |
| 182 | | |
| 183 | | The following is the listing of the final log file, '''log_runner_3303151.out''', generated by '''checkpoint_runner.sh''' ending with message "Application finished all iterations." |
| | 209 | === Sample checkpoint runner logs === |
| | 210 | |
| | 211 | Here are the first and last output logs of the sequence of jobs generated by the job script '''checkpoint_runner.sh'''. |
| | 212 | |
| | 213 | All of the jobs in that sequence were submitted by the [wiki://Workshops/JobCheckpointing/Examples#checkpoint_submitter.sh checkpoint_submitter.sh] job script. |
| | 214 | |
| | 215 | ==== Listing of the initial checkpoint runner log - starting application ==== |
| | 216 | |
| | 217 | Here is the listing of the intial log file, '''log_runner_3303141.out''', generated by the job script '''checkpoint_runner.sh''' ending with message "Application finished all iterations." |
| | 218 | |
| | 219 | {{{ |
| | 220 | [tulaneID@cypress2 ~]$cat log_runner_3303141.out |
| | 221 | Info[20260401-17:44:05]: Start on cypress01-066; JOBID=3303141 |
| | 222 | Info[20260401-17:44:05]: Runner settings: |
| | 223 | Info[20260401-17:44:05]: APP_CMD=./checkpoint_signal_iter.sh |
| | 224 | Info[20260401-17:44:05]: CHECKPOINT_EVERY=20 |
| | 225 | Info[20260401-17:44:05]: CKPT_PATH=state_iter_bash.txt |
| | 226 | Info[20260401-17:44:05]: LAUNCH_MODE=direct |
| | 227 | Info[20260401-17:44:05]: MAX_ITER=500 |
| | 228 | Info[20260401-17:44:05]: MODULE_LIST=anaconda3/2023.07 |
| | 229 | Info[20260401-17:44:05]: RUNNER_MARGIN_SEC=60 |
| | 230 | Info[20260401-17:44:05]: RUNNER_TIME_LIMIT=00:03:00 |
| | 231 | Info[20260401-17:44:05]: SRUN_ARGS=-n 1 |
| | 232 | Info[20260401-17:44:05]: Loading modules. |
| | 233 | Resuming from i=0 (every 20, MAX_ITER=500) |
| | 234 | [periodic/iter] saved i=20 |
| | 235 | [periodic/iter] saved i=40 |
| | 236 | [periodic/iter] saved i=60 |
| | 237 | [periodic/iter] saved i=80 |
| | 238 | [periodic/iter] saved i=100 |
| | 239 | Bash SIGTERM: saving i=120 and exiting 99 |
| | 240 | Info[20260401-17:46:05]: Program exit code (from timeout wrapper): 124 |
| | 241 | Info[20260401-17:46:05]: Timeout + checkpoint advance detected (0->120). |
| | 242 | }}} |
| | 243 | |
| | 244 | ==== Listing of the final checkpoint runner log - completed application ==== |
| | 245 | |
| | 246 | Here is the listing of the final log file, '''log_runner_3303151.out''', generated by '''checkpoint_runner.sh''' ending with message "Application finished all iterations." |