Hoffman2:Job Array: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Here, we use the this template code to show how it can be done | Here, we use the this template code to show how it can be done | ||
'''[[Hoffman2:Submit_jobarray|Submit job]]''' | '''[[Hoffman2:Submit_jobarray|Submit job]]''' | ||
#!/bin/bash | #!/bin/bash | ||
Line 18: | Line 17: | ||
# Notify when | # Notify when | ||
#$ -m bea | #$ -m bea | ||
#$ -t 1-100: | #$ -t 1-50:1 | ||
The only difference comparing with the single subject version is this part | |||
#$ -t 1-50:1 | |||
-t lower-upper:interval | |||
where | |||
;<code>lower</code> | |||
: is replaced with the starting number | |||
;<code>upper</code> | |||
: is replaced with the ending number | |||
;<code>interval</code> | |||
: is replaced with the step interval | |||
So adding the argument | |||
-t 10-100:5 | |||
will step through the numbers 10, 15, 20, 25, ..., 100 submitting a job for each one. |
Revision as of 21:12, 19 December 2019
Job Array or Array jobs make it possible to process different subjects/files using the same script on multiple Hoffman2 working nodes at the same time.
Here, we use the this template code to show how it can be done Submit job
#!/bin/bash #$ -cwd # error = Merged with joblog #$ -o joblog.$JOB_ID #$ -j y #$ -pe shared 2 #$ -l h_rt=8:00:00,h_data=4G # Email address to notify #$ -M $USER@mail # Notify when #$ -m bea #$ -t 1-50:1
The only difference comparing with the single subject version is this part
#$ -t 1-50:1
-t lower-upper:interval
where
lower
- is replaced with the starting number
upper
- is replaced with the ending number
interval
- is replaced with the step interval
So adding the argument
-t 10-100:5
will step through the numbers 10, 15, 20, 25, ..., 100 submitting a job for each one.