Hoffman2:Job Submission Templates: Difference between revisions
Jump to navigation
Jump to search
(Created page with "*Submit job example example script for submitting a single job *Submit job example (tcsh) same as above, written for tcsh *Submit jobarray example.sh example script for submi...") |
|||
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Hoffman2|Back to all things Hoffman2]] | |||
===Job submission templates=== | |||
'''[[Hoffman2:Submit_job|Submit job]]''' | |||
*example script for submitting a single job | |||
'''[[Hoffman2:Submit_job_(tcsh)|Submit job (tcsh)]]''' | |||
*same as above, written for tcsh | |||
'''[[Hoffman2:Submit_jobarray|Submit jobarray]]''' | |||
*example script for submitting a jobarray with hard-coded array values | |||
'''[[Hoffman2:Submit_jobarray_(readarray)|Submit jobarray (readarray)]]''' | |||
*example script for submitting a jobarray with an array read in from a file, e.g. 'subjects.txt' | |||
===To work with these example scripts=== | |||
#Edit the "preamble" content at the top to adjust the memory (h_data) and run time (h_rt). You can also adjust the number of cores: 2 cores is '-pe shared 2'. I recommend 2, 4, or 8 for this value. Be aware that the number of cores is a multiplier for the RAM. h_data=4G and 2 cores is 8G total. | #Copy the contents of the script template into a new script, e.g. <code>myscript.sh</code>. ''Watch out for line ending errors caused by copying/pasting from a Mac or PC.'' Line ending issues can be fixed with <code>dos2unix myscript.sh</code>. | ||
#Edit the "preamble" content at the top to adjust the memory (h_data) and run time (h_rt). | |||
#*For jobs longer than 24 hours, you must specify the 'highp' option, e.g. <code>-l h_rt=36:00:00,h_data=4G,highp</code> | |||
#*You can also adjust the number of cores: 2 cores is '-pe shared 2'. I recommend 2, 4, or 8 for this value. Be aware that the number of cores is a multiplier for the RAM. h_data=4G and 2 cores is 8G total. | |||
#*Edit the mail notification options: '-m bea' means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error). You may use any combination of 'b', 'e', and 'a' for this setting. | |||
#Put your script content at the bottom. | #Put your script content at the bottom. | ||
#Submit directly to the job scheduler like this: <code>qsub myscript.sh</code> | #Submit directly to the job scheduler like this: <code>qsub myscript.sh</code> |
Latest revision as of 23:28, 4 December 2017
Job submission templates
- example script for submitting a single job
- same as above, written for tcsh
- example script for submitting a jobarray with hard-coded array values
- example script for submitting a jobarray with an array read in from a file, e.g. 'subjects.txt'
To work with these example scripts
- Copy the contents of the script template into a new script, e.g.
myscript.sh
. Watch out for line ending errors caused by copying/pasting from a Mac or PC. Line ending issues can be fixed withdos2unix myscript.sh
. - Edit the "preamble" content at the top to adjust the memory (h_data) and run time (h_rt).
- For jobs longer than 24 hours, you must specify the 'highp' option, e.g.
-l h_rt=36:00:00,h_data=4G,highp
- You can also adjust the number of cores: 2 cores is '-pe shared 2'. I recommend 2, 4, or 8 for this value. Be aware that the number of cores is a multiplier for the RAM. h_data=4G and 2 cores is 8G total.
- Edit the mail notification options: '-m bea' means you want to receive a message when your job Begins, Ends, or Aborts (quits due to an error). You may use any combination of 'b', 'e', and 'a' for this setting.
- For jobs longer than 24 hours, you must specify the 'highp' option, e.g.
- Put your script content at the bottom.
- Submit directly to the job scheduler like this:
qsub myscript.sh