<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://giwiki.gi.ucsc.edu/index.php?action=history&amp;feed=atom&amp;title=Quick_Reference_Guide</id>
	<title>Quick Reference Guide - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://giwiki.gi.ucsc.edu/index.php?action=history&amp;feed=atom&amp;title=Quick_Reference_Guide"/>
	<link rel="alternate" type="text/html" href="http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;action=history"/>
	<updated>2026-06-09T20:00:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=314&amp;oldid=prev</id>
		<title>Anovak: /* General Commands */</title>
		<link rel="alternate" type="text/html" href="http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=314&amp;oldid=prev"/>
		<updated>2023-05-15T19:59:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;General Commands&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:59, 15 May 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  man squeue&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  man squeue&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  man scancel&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  man scancel&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; man srun&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Submitting jobs ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Submitting jobs ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following example script specifies a partition, time limit, memory allocation and number of cores. All your scripts should specify values for these four parameters. You can also set additional parameters as shown, such as jobname and output file. For This script performs a simple task — it generates of file of random numbers and then sorts it. A detailed explanation the script is available here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following example script specifies a partition, time limit, memory allocation and number of cores. All your scripts should specify values for these four parameters. You can also set additional parameters as shown, such as jobname and output file. For This script performs a simple task — it generates of file of random numbers and then sorts it. A detailed explanation the script is available here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Anovak</name></author>
	</entry>
	<entry>
		<id>http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=288&amp;oldid=prev</id>
		<title>Weiler: /* Advanced (but useful!) Commands */</title>
		<link rel="alternate" type="text/html" href="http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=288&amp;oldid=prev"/>
		<updated>2023-03-09T03:52:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Advanced (but useful!) Commands&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:52, 8 March 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot;&gt;Line 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 83:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After resuming, check if any are still suspended:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After resuming, check if any are still suspended:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  squeue -ho %A -u $USER -t S | wc -l&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  squeue -ho %A -u $USER -t S | wc -l&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;View Cluster State&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;View Cluster State&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  shost&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  shost&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Weiler</name></author>
	</entry>
	<entry>
		<id>http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=287&amp;oldid=prev</id>
		<title>Weiler at 03:51, 9 March 2023</title>
		<link rel="alternate" type="text/html" href="http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=287&amp;oldid=prev"/>
		<updated>2023-03-09T03:51:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;amp;diff=287&amp;amp;oldid=286&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Weiler</name></author>
	</entry>
	<entry>
		<id>http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=286&amp;oldid=prev</id>
		<title>Weiler: Created page with &quot;== Job scheduling commands == {| class=&quot;wikitable&quot; |- ! Commands ! Function ! Basic Usage ! Example |- ! sbatch ! submit a slurm job ! sbatch [script] ! $ sbatch job.sub |- !...&quot;</title>
		<link rel="alternate" type="text/html" href="http://giwiki.gi.ucsc.edu/index.php?title=Quick_Reference_Guide&amp;diff=286&amp;oldid=prev"/>
		<updated>2023-03-09T03:39:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Job scheduling commands == {| class=&amp;quot;wikitable&amp;quot; |- ! Commands ! Function ! Basic Usage ! Example |- ! sbatch ! submit a slurm job ! sbatch [script] ! $ sbatch job.sub |- !...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Job scheduling commands ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Commands&lt;br /&gt;
! Function&lt;br /&gt;
! Basic Usage&lt;br /&gt;
! Example&lt;br /&gt;
|-&lt;br /&gt;
! sbatch&lt;br /&gt;
! submit a slurm job&lt;br /&gt;
! sbatch [script]&lt;br /&gt;
! $ sbatch job.sub&lt;br /&gt;
|-&lt;br /&gt;
! scancel&lt;br /&gt;
! delete slurm batch job&lt;br /&gt;
! scancel [job_id]&lt;br /&gt;
! $ scancel 123456&lt;br /&gt;
|-&lt;br /&gt;
! scontrol hold&lt;br /&gt;
! hold slurm batch jobs&lt;br /&gt;
! scontrol hold [job_id]&lt;br /&gt;
! $ scontrol hold 123456&lt;br /&gt;
|-&lt;br /&gt;
! scontrol release&lt;br /&gt;
! release hold on slurm batch jobs&lt;br /&gt;
! scontrol release [job_id]&lt;br /&gt;
! $ scontrol release 123456&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Job management commands ==&lt;br /&gt;
Job Status	Commands&lt;br /&gt;
sinfo -a	list all queues&lt;br /&gt;
squeue 	list all jobs&lt;br /&gt;
squeue -u userid	list jobs for userid&lt;br /&gt;
squeue -t R	list running jobs&lt;br /&gt;
smap	show jobs, partitions and nodes in a graphical network topology&lt;br /&gt;
Job script basics&lt;br /&gt;
&lt;br /&gt;
A typical job script will look like this:&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#SBATCH --nodes=1&lt;br /&gt;
#SBATCH --cpus-per-task=8&lt;br /&gt;
#SBATCH --time=02:00:00&lt;br /&gt;
#SBATCH --mem=128G&lt;br /&gt;
#SBATCH --mail-user=netid@gmail.com&lt;br /&gt;
#SBATCH --mail-type=begin&lt;br /&gt;
#SBATCH --mail-type=end&lt;br /&gt;
#SBATCH --error=JobName.%J.err&lt;br /&gt;
#SBATCH --output=JobName.%J.out&lt;br /&gt;
&lt;br /&gt;
cd $SLURM_SUBMIT_DIR&lt;br /&gt;
&lt;br /&gt;
module load modulename&lt;br /&gt;
&lt;br /&gt;
your_commands_goes_here&lt;br /&gt;
&lt;br /&gt;
Lines starting with #SBATCH are for SLURM resource manager to request resources for HPC. Some important options are as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Caption: Batch File&lt;br /&gt;
|-&lt;br /&gt;
! Option&lt;br /&gt;
! Examples&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
--nodes	#SBATCH --nodes=1	Number of nodes&lt;br /&gt;
--cpus-per-task	#SBATCH --cpus-per-task=16	Number of CPUs per node&lt;br /&gt;
--time	#SBATCH --time=HH:MM:SS	Total time requested for your job&lt;br /&gt;
--output	#SBATCH -output filename	STDOUT to a file&lt;br /&gt;
--error	#SBATCH --error filename	STDERR to a file&lt;br /&gt;
--mail-user 	#SBATCH --mail-user user@domain.edu	Email address to send notifications&lt;br /&gt;
Interactive session&lt;br /&gt;
&lt;br /&gt;
To start a interactive session execute the following:&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
#this command will give 1 Node for a time of 4 hours&lt;br /&gt;
&lt;br /&gt;
srun -N 1 -t 4:00:00 --pty /bin/bash&lt;br /&gt;
&lt;br /&gt;
Getting information on past jobs&lt;br /&gt;
&lt;br /&gt;
You can use slurm database to see how much memory your previous jobs used, e.g. the following command will report requested memory and used residential and virtual memory for job&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
sacct -j &amp;lt;JOBID&amp;gt; --format JobID,Partition,Submit,Start,End,NodeList%40,ReqMem,MaxRSS,MaxRSSNode,MaxRSSTask,MaxVMSize,ExitCode&lt;br /&gt;
&lt;br /&gt;
Aliases that provide useful information parsed from the SLURM commands&lt;br /&gt;
&lt;br /&gt;
Place these alias’ into your .bashrc&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
alias si=&amp;quot;sinfo -o \&amp;quot;%20P %5D %14F %8z %10m %10d %11l %16f %N\&amp;quot;&amp;quot;&lt;br /&gt;
alias sq=&amp;quot;squeue -o \&amp;quot;%8i %12j %4t %10u %20q %20a %10g %20P %10Q %5D %11l %11L %R\&amp;quot;&amp;quot;&lt;/div&gt;</summary>
		<author><name>Weiler</name></author>
	</entry>
</feed>