The submission script

We'll tackle this one the other way around. So let's create our submission script first. You can download the script here: JobArray.qsub.sh

   1 #!/bin/bash
   2 #PBS -N JobArray
   3 #PBS -l nodes=1:ppn=1
   4 #PBS -l walltime=00:01:00
   5 
   6 /usr/bin/python2.7 $HOME/tutorial/JobArray/JobArray.py $PBS_ARRAYID 

The only special thing here is that we'll be passing the array id (so the number of the job in the array) to our Python script.