<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Hoffman_Queues</id>
	<title>Hoffman Queues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/index.php?action=history&amp;feed=atom&amp;title=Hoffman_Queues"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman_Queues&amp;action=history"/>
	<updated>2026-05-09T05:39:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman_Queues&amp;diff=1258&amp;oldid=prev</id>
		<title>Ccn admin: 3 revisions</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman_Queues&amp;diff=1258&amp;oldid=prev"/>
		<updated>2014-01-16T03:42:46Z</updated>

		<summary type="html">&lt;p&gt;3 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Introduction =&lt;br /&gt;
So now you&amp;#039;re on hoffman. And you&amp;#039;re running a script. But it&amp;#039;s soo freaking slow. or BAM LOST CONNETION! OH NOESSS!&lt;br /&gt;
Well don&amp;#039;t worry! With these commands, you&amp;#039;ll be hitting your head why you didn&amp;#039;t check out this page earlier.&lt;br /&gt;
&lt;br /&gt;
On Hoffman, when you login, you&amp;#039;re logging in through a Login Node [only designed for login, hence login]. But in the dark backrooms, there are many many Computing Nodes [designed for computing!] To access these computing nodes, below are the commands that will let you access this enormous power.&lt;br /&gt;
It&amp;#039;s pretty wordy, I know. Just look at the examples, you should be smart enough to figure it out :D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hoffman Queues (SGE)=&lt;br /&gt;
&lt;br /&gt;
List of SGE Commands:&lt;br /&gt;
:[[#qsub]]	    Submit a Job&lt;br /&gt;
:[[#qstat]]	    Determine the Status of a Job&lt;br /&gt;
:[[#qdel]]	    Cancel a Job&lt;br /&gt;
:[[#qhold]]    Place a hold on a queued job to prevent it from running&lt;br /&gt;
:[[#qrls]]	    Release a job held with qhold&lt;br /&gt;
&lt;br /&gt;
For a more complete description of Commands: [http://www.ats.ucla.edu/clusters/common/computing/batch/sge.htm SGE Computing]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qsub==&lt;br /&gt;
The qsub command is used to submit jobs to SGE. The syntax of the qsub command is:&lt;br /&gt;
 qsub [-cwd][-V] [-v SOME_VAR] [-o path] [-e path] [-M mail_address] [-m mail_options] [-l resources] script&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
*-cwd&lt;br /&gt;
:Directs SGE to run the job in the same directory from which you submitted it.&lt;br /&gt;
&lt;br /&gt;
* -V&lt;br /&gt;
:Directs SGE to use the current Profile Environment from which you submitted it.&lt;br /&gt;
&lt;br /&gt;
*-v SOME_VAR&lt;br /&gt;
:Passes environment variable SOME_VAR to the job.&lt;br /&gt;
&lt;br /&gt;
*-o path&lt;br /&gt;
:Redirects stdout from the SGE script. The default is your home directory. Specify /dev/null to disgard SGE messages.&lt;br /&gt;
&lt;br /&gt;
*-e path&lt;br /&gt;
:Redirects stderr from the SGE script. The default is your home directory. Specify /dev/null to disgard SGE error messages. &lt;br /&gt;
&lt;br /&gt;
*-M mail_address&lt;br /&gt;
:where mail_address is user&amp;#039;s email address. It is always login_id@mail on Hoffman2.&lt;br /&gt;
&lt;br /&gt;
*-m mail_options&lt;br /&gt;
:Specifies the circumstances under which mail is to be sent to the job owner defined by -M option. &lt;br /&gt;
:For example options &amp;quot;bea&amp;quot; mean mail is sent at the begining, end, and at abort time (if it happens) of the job. Option &amp;quot;n&amp;quot; means no mail will be sent.&lt;br /&gt;
&lt;br /&gt;
*-l resources&lt;br /&gt;
:Specifies a list of resouces required for your job, for example memory and time per core:&lt;br /&gt;
 -l h_data=1024M,h_rt=24:00:00 &lt;br /&gt;
&lt;br /&gt;
*script&lt;br /&gt;
:Either the SGE command file or the script that starts up your job.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; example #1 &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 $ qsub -cwd -V -v 1 2 3 -o path -l h_data=1024M,h_rt=24:00:00 example1.sh&lt;br /&gt;
&lt;br /&gt;
example1.sh &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
# example1.sh&lt;br /&gt;
print $1 $2 $3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
file [path] output&lt;br /&gt;
 1 2 3&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; example #2 &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 $ qsub example2.sh&lt;br /&gt;
&lt;br /&gt;
example2.sh&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/bin/bash&lt;br /&gt;
# example1.sh&lt;br /&gt;
# SGE COMMANDS&lt;br /&gt;
&lt;br /&gt;
#$ -cwd &lt;br /&gt;
#$ -o path &lt;br /&gt;
#$ -V&lt;br /&gt;
#$ -l h_data=1024M,h_rt=24:00:00&lt;br /&gt;
&lt;br /&gt;
print $1 $2 $3&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
file [path] output&lt;br /&gt;
 1 2 3&lt;br /&gt;
&lt;br /&gt;
==qstat==&lt;br /&gt;
&lt;br /&gt;
The qstat command displays information about the jobs in the SGE queues, both running and waiting to run. &lt;br /&gt;
The syntax of the qstat command is:&lt;br /&gt;
 qstat [-f] [-j job_number] [-U login_id] [-u login_id]&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
*(qstat alone with no arguments)&lt;br /&gt;
:Displays a list of all running and waiting jobs.&lt;br /&gt;
&lt;br /&gt;
*-f&lt;br /&gt;
:Displays summary information on each queue as well as the job list.&lt;br /&gt;
&lt;br /&gt;
*-j job_number&lt;br /&gt;
:Displays the status of the job whose job number is job_number&lt;br /&gt;
&lt;br /&gt;
*-U login_id&lt;br /&gt;
:Displays a list of running and waiting jobs for those queues which login_id can access. Or use the groupjobs script for this information; enter groupjobs -help for usage information.&lt;br /&gt;
&lt;br /&gt;
*-u login_id&lt;br /&gt;
:Displays a list of login_id &amp;#039;s running and waiting jobs. Or use the myjobs script for this information for your own login_id.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; example &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 qstat -u username&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qdel==&lt;br /&gt;
The qdel command is used to cancel a job either while it is waiting to execute or while it is running. &lt;br /&gt;
The syntax of the qdel command is:&lt;br /&gt;
 qdel job_number&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;example&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 # Deletes all jobs from user&lt;br /&gt;
 qdel -u username&lt;br /&gt;
&lt;br /&gt;
 # Deletes one job [11111] (Use qstat to find job ID)&lt;br /&gt;
 qdel 11111&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qhold==&lt;br /&gt;
Place a hold on a queued job to prevent it from running. &lt;br /&gt;
The syntax of the qhold command is:&lt;br /&gt;
 qhold job_number&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==qrls==&lt;br /&gt;
Release a job held with qhold.&lt;br /&gt;
The syntax of the qrls command is:&lt;br /&gt;
 qrls job_number&lt;/div&gt;</summary>
		<author><name>Ccn admin</name></author>
	</entry>
</feed>