Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
technical:slurm:darwin:templates:start [2023-11-27 16:45] – [Where Can I Find Them?] frey | technical:slurm:darwin:templates:start [2023-11-27 16:50] (current) – old revision restored (2021-04-27 16:21) frey | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DARWIN Slurm Job Script Templates ====== | ||
+ | As on Caviness, environment sense and setup code has been shifted out of the job script templates and into external script fragments that are sourced (executed) by the job script. | ||
+ | |||
+ | ===== Where Can I Find Them? ===== | ||
+ | |||
+ | IT-RCI staff are maintaining the DARWIN templates via git. The production copy of the repository is checked-out in ''/ | ||
+ | |||
+ | The external script fragments (mentioned above and discussed in detail below) can be found in the ''/ | ||
+ | |||
+ | The ''/ | ||
+ | |||
+ | ==== Applications ==== | ||
+ | |||
+ | Software packages that have unique runtime requirements will have a single script or a directory of scripts located in the '' | ||
+ | |||
+ | ==== Generic ==== | ||
+ | |||
+ | The application-specific job scripts are actually based on the generic scripts present in the '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | ===== Hierarchical Modularity ===== | ||
+ | |||
+ | Environment setup tasks have been abstracted into each external script fragment file. Examining the fragment directory: | ||
+ | |||
+ | < | ||
+ | -rw-r--r-- 1 frey sysadmin 1733 Sep 12 2018 common.sh | ||
+ | -rw-r--r-- 1 frey sysadmin 5621 May 6 14:11 gaussian.sh | ||
+ | -rw-r--r-- 1 frey sysadmin 1580 Sep 12 2018 generic-mpi.sh | ||
+ | -rw-r--r-- 1 frey sysadmin 1432 Sep 14 2018 mpich.sh | ||
+ | -rw-r--r-- 1 frey sysadmin 4805 Sep 12 2018 openmpi.sh | ||
+ | -rw-r--r-- 1 frey sysadmin 2209 May 6 14:11 openmp.sh | ||
+ | </ | ||
+ | |||
+ | ===== Signal Handling ===== | ||
+ | |||
+ | One thing added to the job environment by the '' | ||
+ | |||
+ | < | ||
+ | : | ||
+ | cleanup() { | ||
+ | echo "Time limit exceeded, scrubbing all junk files now" | ||
+ | exit 0 | ||
+ | } | ||
+ | UD_JOB_EXIT_FN=cleanup | ||
+ | . / | ||
+ | |||
+ | sleep 500000000 | ||
+ | </ | ||
+ | |||
+ | When this job is preempted, the '' | ||
+ | |||
+ | In order to get signals to work asynchronously in the Bash shell, long-running commands must be run in the background. | ||
+ | |||
+ | < | ||
+ | : | ||
+ | cleanup() { | ||
+ | echo "Time limit exceeded, scrubbing all junk files now" | ||
+ | exit 0 | ||
+ | } | ||
+ | UD_JOB_EXIT_FN=cleanup | ||
+ | . / | ||
+ | |||
+ | UD_EXEC sleep 500000000 | ||
+ | </ | ||
+ | |||
+ | The '' |