Skip to content

Instantly share code, notes, and snippets.

@ecwheele
Created September 29, 2017 18:11
Show Gist options
  • Save ecwheele/b9b4e4bba69a059653faa67f4f95df8e to your computer and use it in GitHub Desktop.
Save ecwheele/b9b4e4bba69a059653faa67f4f95df8e to your computer and use it in GitHub Desktop.
**Array Jobs on TSCC**
We can specify in the submission parameters that we want to submit an array job. Here is an example. Notice the -t flag, that tells TSCC to use an array job to process this. Since we have 4 commands here, we will use -t 1-4.
#!/bin/bash
#PBS -N run_homer
#PBS -o run_homer.sh.out
#PBS -e run_homer.sh.err
#PBS -l walltime=5:00:00
#PBS -l nodes=1:ppn=1
#PBS -q hotel
#PBS -t 1-4
cmd[1]="STAR --all-my-flags"
cmd[2]="STAR --all-my-new-flags"
cmd[3]="STAR --all-my-third-flags"
cmd[4]="STAR --all-my-fourth-flags"
eval ${cmd[$PBS_ARRAYID]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment