[Lintula home] -> [Instructions] -> [N1 Grid Engine] -> [Grid Engine commands]
[Tämä sivu suomeksi]

Lintula

N1 Grid Engine commands


This page describes some of the Grid Engine commands and their options. Complete list of the command line options can be found from man pages or with --help option.

qsub

qsub is used to send jobs to run with the Grid Engine.
Form of the command is qsub [options] <jobscript>.

Option Description
-N <name>Specifies the name of the job.
-o <[/path/]file>Place for standard output stream of the job.
-e <[/path/]file>Place for standard error stream of the job.
-j ySpecifies whether or not the standard error stream of the job is merged into the standard output stream.
-S </path/shell>Specifies the interpreting shell for the job.
-cwdExecute the job from the current working directory. (Default is the user's home directory.)
-VSpecifies that all environment variables active within the qsub utility be exported to the context of the job.
-a [[CC]]YY]MMDDhhmm.[ss]Time when the job becomes runnable.
-p <priority>Priority between -1023 - 1024. Normal users can only lower the priority of their jobs.
-l <resource>List of resources the job needs.
-r noDo not restart the job, even if the node running the job crashes.
-t n[-m[:s]]Run the job as array job. Arguments n, m and s will be available through the environment variables SGE_TASK_FIRST, SGE_TASK_LAST ja SGE_TASK_STEPSIZE. The index numbers will be exported to the job tasks via the environment variable SGE_TASK_ID.
-q <queue>Queue or comma separated list of queues which can be used to run the job.
-m b|e|a|s|nSend email notifications about the job

-m b Mail is sent at the beginning of the job.
-m e Mail is sent at the end of the job.
-m a Mail is sent when the job is aborted or rescheduled
-m s Mail is sent when the job is suspended.
-m n No mail is sent. (default)

If you use this option, remember to also use -M to specify the email address. One job can have multiple -m options.

-M <mail@addre.ss>Specifies the email address to which send notifications. If you use -m option, remember to also set this.
Frequently used settings can be stored in file .sge_request in home directory. These could be for example email address for notifications or preferred queue for the jobs. These default settings can always be overridden from the command line.

mustaharakka:~$ cat .sge_request
-q outolintu
-M aoksavuo@cs.tut.fi
-m b
-m e
Example uses the outolintu-queue and sends email notifications at job start and end to aoksavuo@cs.tut.fi.

Resources the job needs

Resource Explanation
arch Architecture the job will be run on, either lx24-x86 or sol-sparc64.
h_cpu=HH:MM:SS cputime, time job is allowed to spend on cpu. When the limit is reached job will be killed.
h_rt=HH:MM:SS realtime, time job is allowed to spend. When the limit is reached job will be killed. By default the limit is 24 hours.
Bigger limits, for example 4 days, can be given like this:
qsub -l h_rt=96:0:0 ./skripti.sh
mf=<amount> memoryfree, required amount of free physical memory.
For example require host running the job to have at least 1 GB of free memory:
qsub -l mf=1G ./skripti.sh
mt=<amount> memorytotal, required amount of total physical memory.
slots=<num> Number of slots required to run the job, 1 by default. If single task consist of many computing threads, it might be good to reserve more than 1 slot for it. Larger than 2 values are not recommended, because currently any computing node doesn't have more than 2 processors, and thus job with slot requirement >2 might not be possible to schedule.
vf=<amount> virtualfree, required amount of free virtual memory.
vt=<amount> virtualtotal, required amount of total virtual memory.

qstat

qstat command shows the status of the queues and jobs in the grid. Without options it lists jobs currently running or pending execution.
Form of the command is qstat [options].

Option Description
-u usernameLists users jobs
-fSpecifies a "full" format display of information.
-j [job_list]Prints information either for all pending jobs or the jobs contained in job_list.
-q <queue_list>Print information for specific queues.

qalter

qalter can be used to change parameters for pending jobs.
Form of the command is qalter <options> <job_id>. Options for qalter are the same as for qsub command.

qdel

qdel can be used to remove running or pendig jobs from the grid.
Form of the command is qdel [-f] <list of job_ids>.

Option Description
-f Forces the remove of the job even if the execution node running the job doesn't respond.

qacct

qacct is used to report and account for N1 Grid Engine usage.
Information for specific job can be obtained with command qacct -j <job_id>. More reporting methods are listed on the man page.

qlogin

qlogin is used to start interactive job.
Form of the command is qlogin [options]. Options for qlogin are the same as for qsub command.

qselect

qselect can be used to find suitable queues for jobs.
Without options, qselect will list every queue instance in the grid. With command line options, the list of queues can be limited. Options can be for example resources, which can be specified whit -l option like with qsub.
28.06.2010