Revision 4 as of 2012-10-16 19:35:29

Clear message
Locked History Actions


Infolab Compute Cluster


To submit the jobs to the compute cluster you need to log in to the submission node Use your CS credentials to log in.


Job scheduling

All the jobs are submitted with Torque resource manager and are scheduled by the MAUI scheduler. Please do not log in to the nodes directly and run jobs from there.

Torque used to be called PBS, so if you see any resources talking about the PBS resource manager those more or less apply to Torque as well. Also please excuse us if we use PBS and Torque interchangeably.


qsub is the main command that submits your job to the cluster. The command uses the following syntax:

qsub script_file

So if I have a script called that I would like to run on a cluster I can do so by executing the following:


script_file should be a text file

The script_file should contain the name and the path to your executable file and extra instructions that tell the resource manager how to run your job. Don't worry, we'll talk more about those later.

script_file nost not be binary/executable file

Never use qsub to submit a binary executable to the resource manager. This will result in a successful job submission, but the runner that is the job is assigned to will fail to execute it with a "Cannot execute a binary file" error.

Preparing your job

Preparing your job for the scheduler is as simple as adding a few comments to a script that runs your program. Here is an example:

#PBS -N my_job_name
#PBS -l nodes=1:ppn=1
#PBS -l walltime=01:10:00

echo "I am running on:"
sleep 20

The comment lines that start with the PBS keyword let you select different PBS options:

  • #PBS -N: lets you specify a friendly job name
  • #PBS -l nodes=1:ppn=1: specifies that I would like my job to run on a single node (nodes) and on a single core (ppn)
  • #PBS -l walltime=01:10:00: specifies the amount of real time I anticipate that my script will need to finish. Please note that the scheduler will terminate my script if it does not finish in time.

For a more comprehensive list of resources that you can slecify with #PBS -l see here: Note however, that there is currently only one queue without very many parameters set.

Make sure that your job uses data from:

  • Your CS home directory (whatever is under /afs/ on hulk, rocky and snapx, please note that user home directories are not yet available under /u/your_csid on snapx)
  • Network mounted directories from rocky and hulk:
    • /dfs/hulk/0
    • /dfs/rocky/0

Here is an example of a bit more complex script to run an MPI job (copied from

#PBS -l nodes=2:ppn=4

# Make sure that we are in the same subdirectory as where the qsub command 
# is issued. 

#  make a list of allocated nodes(cores)
cat $PBS_NODEFILE > nodes

# How many cores total do we have?
NO_OF_CORES=`cat $PBS_NODEFILE | egrep -v '^#'\|'^$' | wc -l | awk '{print $1}'`

# Just for kicks, see which nodes we got.

# Run the executable. *DO NOT PUT* a '&' at the end!!
mpirun -np $NO_OF_CORES -machinefile nodes ./pi3 >& log 

Submitting your job

Now that your job is prepared you have to submit it to the resource manager. Use qsub to submit your jobs:


Make sure you run qsub from your CS home directory or from a network mounted filesystem (see above). Once the job is finished output data will wait for you in the same directory and there will be two additional files that end in e<job#> and o<job#>. These two are stderr and stdout, respectively.

Check the status of your job

You can check what is happening with your job with the qstat command:

qstat jobid

jobid is the number that the resource manager assigned to your job (the first number qsub will output after you successfully submit a job).

Other useful commands

  • qdel job_id: deletes your job
  • qstat -q: lists all queues
  • qstat -a: lists all jobs
  • qstat -au userid: lists all jobs submitted by userid
  • pbsnodes: list status of all the compute nodes

More coming soon...