Engineering Network Services - CSU

Engineering Network Services

Additional tips for writing submission scripts

A number of options can be included in your submissions script. Instead of typing those options on the command line while issuing the qsub command, it is preferred that you include it in your scripts. This reduces the risk of giving incorrect inputs to the qsub command. It also reduces the tedious task of typing up the long commands everytime a change is made.

These options need to be added to the top of your script. Each of the options is preceded by #$ .

Following are some neat options that you can include in your script.

  • Instead of typing  -cwd everytime the job is submitted, this can be included in the script by adding the following: #$ -cwd

  • You can give a name to your job . This is different from the script name. To do this, you need to type: #$ -N jobname
  • You can include the parallel environment to which you want to submit the job: #$ -pe  parallelenvironment For example: $# -pe mpich1

  • In case you want to submit the job to a specific host, you can even specify a hostname as follows: #$ -l

  • The shell can be specified as: #$ -S /bin/csh
  • The output and error files can be specified by the following: #$ -o outputfilename and #$ -e errorfilename

  • You can request specific resources using the –l option. For example, if you want your job to run on a host that has 20M of free virtual memory, you would  include the following in your script: #$ -l h_vmem=20m

There are a lot more options that  can be supplied to the the qsub options. These are listed in the man page for qsub. This can be viewed by typing the following: man qsub


layout image
layout image

This document last modified Friday January 22, 2016

Engineering Network Services home page link College of Engineering home page link