Sample Script to Submit a Multi Processor Job to Torque

Here is a sample qsub script, named runjob.parallel, that can be used for submitting parallel jobs.

#!/bin/bash -l
# declare a name for this job to be sample_job
#PBS -N my_parallel_job

# request the default queue for this job
#PBS -q default

# request a total of 32 processors for this job (2 nodes and 16 processors per node)
#PBS -l nodes=2:ppn=16
# request 4 hours of wall time
# Default is 1 hour without this directive
#PBS -l walltime=04:00:00

# mail is sent to you when the job starts and when it terminates or aborts
#PBS -m bea

# specify your email address
#PBS -M John.Smith@dartmouth.edu

#change to the directory where you submitted the job
cd $PBS_O_WORKDIR

# include the relative path to the name of your MPI program
mpirun -np 32 -machinefile $PBS_NODEFILE ./program_name and any arguments
$qsub runjob.parallel
3913932.knorr.bw01.dartmouth.edu

$myjobs
active jobs------------------------
JOBID              USERNAME      STATE PROCS   REMAINING            STARTTIME

3913932              jsmith    Running    32    03:59:46  Tue Mar 30 10:56:30

1 active job             32 of 944 processors in use by local jobs (1.79%)
                         93 of 111 nodes active      (82.30%)

eligible jobs----------------------
JOBID              USERNAME      STATE PROCS     WCLIMIT            QUEUETIME

0 eligible jobs

blocked jobs-----------------------
JOBID              USERNAME      STATE PROCS     WCLIMIT            QUEUETIME

0 blocked jobs

Total job:  1

Sample Script to Submit a Multi Processor Job to Torque Using the Infiniband Nodes

Here is a sample qsub script that can be used for submitting parallel jobs to the infiniband nodes.

#!/bin/bash -l
# declare a name for this job to be sample_job
#PBS -N my_parallel_job

# request the default queue for this job
#PBS -q default

# request a total of 64 processors for this job (4 nodes and 16 processors per node)
#PBS -l nodes=4:ppn=16

# pick the infiniband switch that has available nodes and processors (features -a)
#PBS -l feature='ib2'   # the other possibility is ib1 (8 cores/node)

# request 4 hours of wall time
#PBS -l walltime=04:00:00

# mail is sent to you when the job starts and when it terminates or aborts
#PBS -m bea

# specify your email address
#PBS -M John.Smith@dartmouth.edu

#change to the directory where you submitted the job
cd $PBS_O_WORKDIR

# include the relative path to the name of your MPI program
mpirun_rsh -rsh -np 64 -hostfile $PBS_NODEFILE ./program_name