qsub command PDF Print


qsub command should be your first command after connection to the cluster. You can look at guides from Metacentrum, short and long one. After the run of qsub command you will get reserved some computational nodes.

Your application is there refered as a job, and for each job you should choose maximum time of run. Your choice is than reflect as -q parameter of qsub:

  • short (till 2 hours)
  • normal (till 24 hours)
  • long (till 30 days)
  • jcu (priviledged and till 30 days and only after request see the end of this page)

Next part of qsub command consists of parametrs of computation nodes expressed as -l parameter of qsub that could be combined:

  • nodes=1 (1 computation node)
  • nodes=2:ppn=2 (2 computation nodes each with 2 processors)
  • jcu (only cluster of USB)

There are many other parameters of qsub command (see previous guides), but often is used -I parameter for interactive connection and -N parameter to give the name of script that should be run. Now see some examples of usage:

  • one processor in the cluster of USB with interactive access
$ qsub -q normal -I -l nodes=1:ppn=1:jcu
  •  one processor with interactive access (ie. in the situaction when USB cluster is fully used) with interactive access
$ qsub -q normal -I -l nodes=1:ppn=1
  • 4 processors on one computation node in the cluster of USB with interactive access
$ qsub -q normal -I -l nodes=1:ppn=4:jcu
  • run of job (run.sh) on one computation node with 2 processors
$ qsub -q short -N run.sh -l nodes=1:ppn=2

Also you can write parameters of qsub command in a script (text file). For example mb.sh is a script for MrBayes and qeueu jcu (list of script follows):

#PBS -N MrBayes
#PBS -q jcu
#PBS -l nodes=2:ppn=4:jcu
#PBS -j oe
#PBS -Wgroup_list=jcu
. /packages/run/modules-2.0/init/sh
module add modules ics.muni.cz
module add mpich-p4
mpiexec /software/mrbayes-3.1.2/bin/mb-mpi my_config_file

After logging in front-end of hermes, you can run the script by command :

qsub mb.sh

Priviledged qeue jcu

If your computation will longer than 24 hours, you could ask in Contacts for being added to the users that can submit jobs to the priviledged qeue. Than you can run the jobs in the following fashion (run.sh is name of script that you want to run):

 $ qsub -q jcu -N run.sh -l nodes=1:ppn=4:jcu -Wgroup_list=jcu

For running jobs for longer times you should use qsub command script (like above for MrBayes). It is often in the form :

#PBS -N job_name
#PBS -q jcu
#PBS -l nodes=1:ppn=4:jcu
#PBS -Wgroup_list=jcu    
#PBS -j oe
cd where_is_application_or_configuration_script
./simulation_execution_script > simulation_results.out 2>&1

such a script (run.sh) you submit easily by:

$ qsub run.sh

Last Updated on Tuesday, 15 September 2009 08:18