Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
doku:epilog [2010/10/27 13:14] – external edit 127.0.0.1doku:epilog [2021/05/13 17:45] (current) – removed goldenberg
Line 1: Line 1:
-====== User-specified epilog scripts ====== 
-===== Synopsis: What is an epilog script? When is it run? ===== 
-Epilog scripts are executed on all compute nodes that a job runs on after the job has finished. This happens whether or not the job is killed by a runtime limit. This **enables copying back node-local temporary data** (/work/tmp) after a job was terminated because it exceeded the runtime limit. 
-===== How to use ===== 
-To use this feature, all you have to do is place a bash script called **"epilog.sh"** in the directory you submit your job from (working directory, $SGE_O_WORKDIR). This script is executed **on all of the job's nodes** after the job finishes. \\  
-To customize this even further, you can specify a different name for the script in your job file: 
-<code>#$ -v USER_EPILOG=/path/to/my_epilog_script.sh</code> 
-or when submitting the job: 
-<code>qsub -v USER_EPILOG=/path/to/my_epilog_script.sh job</code> 
-It's probably best to specify the full path when using this method.\\  
-\\  
-Please bear in mind that it is absolutely required that you do only the **minimum necessary work in an epilog** script. Doing long-running tasks in your epilog file will not be tolerated! There is a timeout to prevent buggy epilog scripts from running forever, but it's very generous. 
-==== Example epilog.sh script ==== 
-<code># point this to where your program writes its data to. you should include $JOB_ID, $SGE_TASK_ID, $QUEUE and $HOSTNAME to make sure the directory is unique. 
-TMP_DIR="/work/tmp/${QUEUE}_${JOB_ID}_${SGE_TASK_ID}_${HOSTNAME}" 
  
-cp -r $TMP_DIR ${SGE_O_WORKDIR}</code> 
  • doku/epilog.1288185252.txt.gz
  • Last modified: 2014/05/27 12:45
  • (external edit)