The access key for accessibility features is 0. Press alt 0 to come back here at any time.

Access Keys:

Skip to content | Go to site-wide navigation bar | Go to the navigation list for this section

(external link warning) Link goes to external page

PBS Grid Commands

The following commands are used to set up and monitor the progress of your compute jobs. All of the commands on this page should be run only from the Linux grid submission host: ingrid.engin.umich.edu.


qsub

qsub is the command used to submit jobs to the CAEN Linux grid from the submission host: ingrid.engin.umich.edu. The syntax of the qsub command is:

qsub [options] script_file

The script_file argument is the name of the script file that contains the commands to be run by your job. Several options are available for qsub, such as specifying the date and time of execution of a job. For a detailed list of options type man qsub at the ingrid% prompt.

Note: For all job submissions, you should redirect standard output and standard error for your program to /tmp (Note: These output files will be written to /tmp on the host which ran the job, not ingrid.engin.umich.edu). To do this, use the -o and -e flags.


qstat

Once you have submitted your job, you can see its current state by running the qstat command. Running qstat will give you a list of all jobs that have been submitted to the Linux grid that are queued or in the process of being run:

Job id           Name           User           Time Use S Queue
---------------- -------------- -------------- -------- - -----
576.gridlock     test        user1               0 Q np_workq
1161.gridlock    test1    user2       00:00:15 R np_workq 

The most common states for a job to be in after submission are:

  • Q means the job is in the queue to be run
  • T means the job is attempting to transfer from the queue state to the run state
  • R means the job is running

In this example, job 576 is in the queued state, and job 1161 is in the running state. The qstat command also has several options that alter the output:

  • The -u uniqname option causes qstat to only show jobs submitted by the specified uniqname.
  • The -f option shows full information for each job in the queue.
  • The -i job_id option causes qstat to only show information pertaining to the specified job id.

qalter

The qalter command can be used to change the attributes of pending jobs. Once a job is executing, changes are no longer possible. qalter can change most of the characteristics of a job including those which were defined as embedded flags in the script_file. The syntax of qalter is:

qalter [options] job_id [ - [script_args]]

Using qalter, if you wanted to change the directories where the output files are saved, using the -e and -o options, and you wanted to set the amount of free swap space necessary for your job to run, you would use the command:

ingrid% qalter –e /tmp –o /tmp –soft –l swap_free=15M job_id

where job_id is the number assigned to the job by the Grid when it was submitted. If you do not know the job_id, you can find it by using the qstat command. After successfully altering your submitted job, you would receive a notification similar to the following:

modified stderr path list of job job_id
modified soft resource list of job job_id
modified stdout path list of job job_id

qdel

You can use the qdel command to cancel queued and running jobs. The syntax is:

qdel [-W force] [job_id_list]

The job_id_list consists of one or more job id numbers. You can obtain the ID numbers of your jobs using the qstat command. Using -W force option will force the grid to delete your job even if the host on which it is running is unreachable. When you give multiple job_ids to the qdel command, the first job given is deleted first and the next job is deleted next, until all the jobs are deleted.


Further Command Help

For more information on any of the above commands, type man command or command -help at the ingrid% prompt.