<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FSlurm-Interactive-Salloc</id>
	<title>Tutorials/Slurm-Interactive-Salloc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.anunna.wur.nl/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FSlurm-Interactive-Salloc"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Salloc&amp;action=history"/>
	<updated>2026-11-24T05:32:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Salloc&amp;diff=3288&amp;oldid=prev</id>
		<title>Honfi001 at 11:00, 23 November 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Salloc&amp;diff=3288&amp;oldid=prev"/>
		<updated>2026-11-23T11:00:34Z</updated>

		<summary type="html">&lt;p&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 11:00, 23 November 2026&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-l37&quot;&gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&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;salloc: Granted job allocation 44376930&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;salloc: Granted job allocation 44376930&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;salloc: Nodes node114 are ready for job&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;salloc: Nodes node114 are ready for job&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@login200:~$ hostname&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@login200:~$ hostname&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;login200&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;login200&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@login200:~$ echo $SLURM_JOB_ID&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@login200:~$ echo $SLURM_JOB_ID&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;44376930&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;44376930&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@login200:~$ srun hostname&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@login200:~$ srun hostname&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;node114&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;node114&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;&amp;lt;/syntaxhighlight&amp;gt;&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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&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-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&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;br&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;br&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;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@node114:~$ hostname&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@node114:~$ hostname&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;node114&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;node114&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@node114:~$ tmux new -d -s t1 &#039;sleep 600&#039;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@node114:~$ tmux new -d -s t1 &#039;sleep 600&#039;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@node114:~$ tmux ls&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@node114:~$ tmux ls&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;t1: 1 windows (created Mon Nov 23 06:00:08 2026)&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;t1: 1 windows (created Mon Nov 23 06:00:08 2026)&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;honfi001&lt;/del&gt;@node114:~$ exit&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;user001&lt;/ins&gt;@node114:~$ exit&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;exit&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;exit&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;&amp;lt;/syntaxhighlight&amp;gt;&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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
	<entry>
		<id>https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Salloc&amp;diff=3287&amp;oldid=prev</id>
		<title>Honfi001: Created page with &quot;= Interactive Slurm, Part 3: salloc — allocations and steps =  &#039;&#039;Part 3 of the &#039;&#039;&#039;Interactive Slurm&#039;&#039;&#039; series for the HPC Advanced course. Part 1 covers &lt;code&gt;srun&lt;/code&gt;, and Part 2 covers interactive shells.&#039;&#039;  So far, every interactive session in this series has been tied to one terminal. Close the terminal, lose your connection, or have the login node rebooted under you, and the session is...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Salloc&amp;diff=3287&amp;oldid=prev"/>
		<updated>2026-11-23T10:58:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Interactive Slurm, Part 3: salloc — allocations and steps =  &amp;#039;&amp;#039;Part 3 of the &amp;#039;&amp;#039;&amp;#039;Interactive Slurm&amp;#039;&amp;#039;&amp;#039; series for the HPC Advanced course. &lt;a href=&quot;/Tutorials/Slurm-Interactive-Srun&quot; title=&quot;Tutorials/Slurm-Interactive-Srun&quot;&gt;Part 1&lt;/a&gt; covers &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, and &lt;a href=&quot;/Tutorials/Slurm-Interactive-Shells&quot; title=&quot;Tutorials/Slurm-Interactive-Shells&quot;&gt;Part 2&lt;/a&gt; covers interactive shells.&amp;#039;&amp;#039;  So far, every interactive session in this series has been tied to one terminal. Close the terminal, lose your connection, or have the login node rebooted under you, and the session is...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Interactive Slurm, Part 3: salloc — allocations and steps =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Part 3 of the &amp;#039;&amp;#039;&amp;#039;Interactive Slurm&amp;#039;&amp;#039;&amp;#039; series for the HPC Advanced course. [[Tutorials/Slurm-Interactive-Srun|Part 1]] covers &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, and [[Tutorials/Slurm-Interactive-Shells|Part 2]] covers interactive shells.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So far, every interactive session in this series has been tied to one terminal. Close the terminal, lose your connection, or have the login node rebooted under you, and the session is gone, along with the resources you waited for. This page pulls apart the two things &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; has been doing together all along, and shows how to keep a session on a compute node that you can leave and come back to.&lt;br /&gt;
&lt;br /&gt;
By the end of this page you will be able to:&lt;br /&gt;
&lt;br /&gt;
* explain the difference between an &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039; and a &amp;#039;&amp;#039;&amp;#039;job step&amp;#039;&amp;#039;&amp;#039;;&lt;br /&gt;
* book resources with &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; and run steps inside them;&lt;br /&gt;
* hold an allocation with no terminal attached, and connect to it when you like;&lt;br /&gt;
* keep a &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session on a compute node across disconnects;&lt;br /&gt;
* release what you booked when you are done.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;You need:&amp;#039;&amp;#039;&amp;#039; [[Tutorials/Slurm-Interactive-Srun|Part 1]] and [[Tutorials/Slurm-Interactive-Shells|Part 2]], and basic &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;: start a session, detach with &amp;lt;code&amp;gt;Ctrl-b d&amp;lt;/code&amp;gt;, attach again.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Time:&amp;#039;&amp;#039;&amp;#039; about 45 minutes.&lt;br /&gt;
&lt;br /&gt;
== Allocations and steps ==&lt;br /&gt;
&lt;br /&gt;
Back to the restaurant from Part 1. An &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039; is your table: cores, memory and time on one or more nodes, reserved for you. A &amp;#039;&amp;#039;&amp;#039;step&amp;#039;&amp;#039;&amp;#039; is one dish: one program started inside the allocation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; on the login node books a table, orders one dish, and leaves as soon as it is eaten. You saw that in Part 2, where &amp;lt;code&amp;gt;sacct&amp;lt;/code&amp;gt; showed every session as a job with exactly one step, &amp;lt;code&amp;gt;.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; does only the first half. &amp;#039;&amp;#039;&amp;#039;It books the table and orders nothing.&amp;#039;&amp;#039;&amp;#039; What you order, and when, is up to you, and every &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; you run inside the allocation becomes a new step at the same table, with no new wait in the queue.&lt;br /&gt;
&lt;br /&gt;
== Step 1: salloc ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
salloc --time=00:05:00 -c 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
salloc: Pending job allocation 44376930&lt;br /&gt;
salloc: job 44376930 queued and waiting for resources&lt;br /&gt;
salloc: job 44376930 has been allocated resources&lt;br /&gt;
salloc: Granted job allocation 44376930&lt;br /&gt;
salloc: Nodes node114 are ready for job&lt;br /&gt;
honfi001@login200:~$ hostname&lt;br /&gt;
login200&lt;br /&gt;
honfi001@login200:~$ echo $SLURM_JOB_ID&lt;br /&gt;
44376930&lt;br /&gt;
honfi001@login200:~$ srun hostname&lt;br /&gt;
node114&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Read the prompt carefully, because this is the part that surprises people. You got an allocation on &amp;#039;&amp;#039;&amp;#039;node114&amp;#039;&amp;#039;&amp;#039;, but &amp;#039;&amp;#039;&amp;#039;your shell is still on the login node&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;login200&amp;lt;/code&amp;gt;). On Anunna, &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; gives you a shell on the login node that knows about your allocation (&amp;lt;code&amp;gt;$SLURM_JOB_ID&amp;lt;/code&amp;gt; is set), and nothing more. Some other clusters drop you onto the compute node instead, so do not take this for granted elsewhere.&lt;br /&gt;
&lt;br /&gt;
So in this shell:&lt;br /&gt;
&lt;br /&gt;
* a plain command, such as &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt;, runs &amp;#039;&amp;#039;&amp;#039;on the login node&amp;#039;&amp;#039;&amp;#039;, like any other command there. Do not run heavy work this way;&lt;br /&gt;
* a command started with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; runs &amp;#039;&amp;#039;&amp;#039;on your allocation&amp;#039;&amp;#039;&amp;#039;, as a new step, straight away.&lt;br /&gt;
&lt;br /&gt;
=== The table is yours until you leave ===&lt;br /&gt;
&lt;br /&gt;
An allocation from &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; lasts as long as the &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; shell does, &amp;#039;&amp;#039;&amp;#039;whether or not anything is running in it&amp;#039;&amp;#039;&amp;#039;. Here is the session above, seen in &amp;lt;code&amp;gt;sacct&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sacct -j 44376930 -o JobID%14,JobName%10,Elapsed,State,End&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
         JobID    JobName    Elapsed      State                 End&lt;br /&gt;
-------------- ---------- ---------- ---------- -------------------&lt;br /&gt;
      44376930 interacti+   00:04:57  COMPLETED 2026-11-23T05:59:23&lt;br /&gt;
44376930.exte+     extern   00:04:57  COMPLETED 2026-11-23T05:59:23&lt;br /&gt;
    44376930.0   hostname   00:00:05  COMPLETED 2026-11-23T05:54:32&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The one real piece of work, step &amp;lt;code&amp;gt;.0&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt;), took five seconds. The allocation, the first line, lasted almost five minutes: the shell sat there doing nothing until its connection closed, and the core on node114 was held for nobody the whole time. &amp;#039;&amp;#039;&amp;#039;Type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; as soon as you are done&amp;#039;&amp;#039;&amp;#039;, because an idle allocation still counts against you and still keeps a core from someone in the queue.&lt;br /&gt;
&lt;br /&gt;
The other side of the same fact: &amp;#039;&amp;#039;&amp;#039;the allocation ends when the shell ends.&amp;#039;&amp;#039;&amp;#039; This &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; shell lives on the login node, so if your connection drops, or the login node is rebooted for maintenance, the shell goes and your allocation is released.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Book a table without a shell ==&lt;br /&gt;
&lt;br /&gt;
You can ask &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; for the allocation alone, with no shell attached:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
salloc --no-shell --time=00:15:00 -c 1 -J persist-test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
salloc: Pending job allocation 44376933&lt;br /&gt;
salloc: job 44376933 queued and waiting for resources&lt;br /&gt;
salloc: job 44376933 has been allocated resources&lt;br /&gt;
salloc: Granted job allocation 44376933&lt;br /&gt;
salloc: Nodes node114 are ready for job&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you are back at your prompt. &amp;lt;code&amp;gt;-J persist-test&amp;lt;/code&amp;gt; just gives the job a name, so that you can recognise it. Nothing of yours is running anywhere, but the table is booked. You can log out completely, and it is still there when you come back:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
squeue -j 44376933 -o &amp;quot;%.10i %.13j %.2t %.8M %.9l %R&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
     JOBID          NAME ST     TIME TIME_LIMI NODELIST(REASON)&lt;br /&gt;
  44376933  persist-test  R     0:05     15:00 node114&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That output came from a fresh login, after the one that ran &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; had closed. &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; means running, and &amp;lt;code&amp;gt;NODELIST&amp;lt;/code&amp;gt; tells you which node your table is on. You will need that in Step 4.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;An allocation with no shell does not end by itself when you are done.&amp;#039;&amp;#039;&amp;#039; It runs until its time limit, or until you cancel it (Step 5). Give it an honest &amp;lt;code&amp;gt;--time&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Step 3: Connect with srun, and why that is not enough ==&lt;br /&gt;
&lt;br /&gt;
To get a shell inside that allocation, run a step into it with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=44376933 --overlap --pty bash -i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;--jobid&amp;lt;/code&amp;gt;: put this step into the allocation I already have, instead of booking a new one;&lt;br /&gt;
* &amp;lt;code&amp;gt;--overlap&amp;lt;/code&amp;gt;: let this step share the allocation&amp;#039;s cores with other steps, so that you can open a second terminal into the same job while the first one is still open;&lt;br /&gt;
* &amp;lt;code&amp;gt;--pty bash -i&amp;lt;/code&amp;gt;: the interactive shell from Part 2.&lt;br /&gt;
&lt;br /&gt;
Here we connected, started a &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session, and left:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
honfi001@node114:~$ hostname&lt;br /&gt;
node114&lt;br /&gt;
honfi001@node114:~$ tmux new -d -s t1 &amp;#039;sleep 600&amp;#039;&lt;br /&gt;
honfi001@node114:~$ tmux ls&lt;br /&gt;
t1: 1 windows (created Mon Nov 23 06:00:08 2026)&lt;br /&gt;
honfi001@node114:~$ exit&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we looked for the &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session from another step:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --jobid=44376933 --overlap bash -c &amp;#039;tmux ls; ps -u $USER -o pid,lstart,cmd | grep -E &amp;quot;tmux|sleep&amp;quot; | grep -v grep&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
no server running on /tmp/tmux-17403473/default&lt;br /&gt;
srun: error: node114: task 0: Exited with exit code 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Gone.&amp;#039;&amp;#039;&amp;#039; No &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session, and &amp;lt;code&amp;gt;ps&amp;lt;/code&amp;gt; finds no &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;sleep&amp;lt;/code&amp;gt; process at all (the error line just means &amp;lt;code&amp;gt;grep&amp;lt;/code&amp;gt; found nothing). The allocation was still there, but the &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session was not.&lt;br /&gt;
&lt;br /&gt;
The reason is the most useful idea on this page: &amp;#039;&amp;#039;&amp;#039;when a step ends, Slurm ends everything that was started inside it.&amp;#039;&amp;#039;&amp;#039; Your &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; was a step. &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; was started from that &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, so it belonged to the same step, and when you typed &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; the step ended and took &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; with it. This is deliberate. It is how Slurm makes sure nothing is left behind on a node. It also means &amp;#039;&amp;#039;&amp;#039;no step is a safe place for something you want to keep running&amp;#039;&amp;#039;&amp;#039;: not &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;, not &amp;lt;code&amp;gt;nohup&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Step 4: A tmux session that survives ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The recommended way to keep a persistent shell on a compute node is a batch job running &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;, which has its own tutorial: [[Tutorials/Slurm-Persistent-Shell|Persistent Shell on a Compute Node]]. It needs nothing beyond what you have learned here, and it is cleaned up properly when the job ends. This section shows the other way, through SSH, because it is useful to know and because it shows the same idea from a different side.&lt;br /&gt;
&lt;br /&gt;
Anunna lets you &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; straight into a compute node, but &amp;#039;&amp;#039;&amp;#039;only while you have a job running on it&amp;#039;&amp;#039;&amp;#039;. Your SSH session is not a step, so it is not ended when a step ends. It is meant to belong to the job as a whole (but read the warning below).&lt;br /&gt;
&lt;br /&gt;
So the pattern is:&lt;br /&gt;
&lt;br /&gt;
# Book the table: &amp;lt;code&amp;gt;salloc --no-shell --time=02:00:00 -c 2 --mem=4G&amp;lt;/code&amp;gt;&lt;br /&gt;
# Find the node: &amp;lt;code&amp;gt;squeue --me&amp;lt;/code&amp;gt;, and read &amp;lt;code&amp;gt;NODELIST&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Log in to it: &amp;lt;code&amp;gt;ssh node114&amp;lt;/code&amp;gt;. The first time you connect to a node, SSH asks whether you trust it. Answer &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Start &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; there: &amp;lt;code&amp;gt;tmux new -s work&amp;lt;/code&amp;gt;, and work inside it.&lt;br /&gt;
# Detach with &amp;lt;code&amp;gt;Ctrl-b d&amp;lt;/code&amp;gt;, log out, close your laptop, go home.&lt;br /&gt;
# Come back: &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; to the login node, &amp;lt;code&amp;gt;ssh node114&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tmux attach -t work&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is what that looks like, run as single commands from the login node. (We added options so that SSH would not stop to ask the trust question. On your first connection you will see that question instead of the &amp;quot;Permanently added&amp;quot; line.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh node114 &amp;quot;hostname; cat /proc/self/cgroup; tmux new -d -s t2 &amp;#039;sleep 600&amp;#039;; tmux ls&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Warning: Permanently added &amp;#039;node114&amp;#039; (ED25519) to the list of known hosts.&lt;br /&gt;
node114&lt;br /&gt;
0::/user.slice/user-17403473.slice/session-2082.scope&lt;br /&gt;
t2: 1 windows (created Mon Nov 23 06:06:45 2026)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That SSH connection closed when the command finished. A new one, fifteen seconds later:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh node114 &amp;#039;tmux ls&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
t2: 1 windows (created Mon Nov 23 06:06:45 2026)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The session survived the disconnect.&amp;#039;&amp;#039;&amp;#039; This is the one that keeps going if your connection drops or the login node is rebooted: it does not live on the login node, and it does not live in a step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #fff3cd; border-left: 6px solid #ff9800; padding: 10px; margin-bottom: 15px;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning — a known problem on Anunna, being fixed.&amp;#039;&amp;#039;&amp;#039; Your SSH session should belong to your job, so that everything you start in it ends when the job ends. At the moment it does not. Look at the &amp;lt;code&amp;gt;cgroup&amp;lt;/code&amp;gt; line above: it names a login session (&amp;lt;code&amp;gt;session-2082.scope&amp;lt;/code&amp;gt;), not the job. As a result, &amp;#039;&amp;#039;&amp;#039;anything you start over SSH on a compute node keeps running after your job has ended&amp;#039;&amp;#039;&amp;#039;, outside the cores and memory you were given, until someone stops it.&lt;br /&gt;
&lt;br /&gt;
Until this is fixed:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;end your &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session yourself&amp;#039;&amp;#039;&amp;#039; (type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; in every window, or run &amp;lt;code&amp;gt;tmux kill-session -t work&amp;lt;/code&amp;gt;) &amp;#039;&amp;#039;&amp;#039;before&amp;#039;&amp;#039;&amp;#039; you cancel your job or its time runs out;&lt;br /&gt;
* run heavy work inside the session with &amp;lt;code&amp;gt;srun --jobid=&amp;amp;lt;job ID&amp;amp;gt; --overlap ...&amp;lt;/code&amp;gt;, so that it stays within your allocation;&lt;br /&gt;
* do not use this to keep things running after your job. That is what &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt; is for.&lt;br /&gt;
&lt;br /&gt;
Once it is fixed, the &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session will end together with the job, as it should, and this box will go.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 5: Give the table back ==&lt;br /&gt;
&lt;br /&gt;
An allocation from &amp;lt;code&amp;gt;salloc --no-shell&amp;lt;/code&amp;gt; keeps its resources until its time runs out. When you are done, cancel it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scancel 44376933&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, the node no longer lets you in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
ssh node114&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Access denied by pam_slurm_adopt: you have no active jobs on this node&lt;br /&gt;
Connection closed by 192.168.0.78 port 22&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That message is the &amp;quot;only while you have a job&amp;quot; rule from Step 4 at work.&lt;br /&gt;
&lt;br /&gt;
== Which one should I use? ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command !! Where your shell runs !! Survives a lost connection? !! The allocation ends when...&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;srun command&amp;lt;/code&amp;gt; || no shell, one command || no || the command finishes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;srun --pty bash -i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; || compute node || no || you exit the shell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; || &amp;#039;&amp;#039;&amp;#039;login node&amp;#039;&amp;#039;&amp;#039; || no || you exit the shell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;salloc --no-shell&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;srun --jobid --overlap --pty bash -i&amp;lt;/code&amp;gt; || compute node, as a step || the allocation does; the shell and anything started in it do not || you &amp;lt;code&amp;gt;scancel&amp;lt;/code&amp;gt; it, or time runs out&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;salloc --no-shell&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; || compute node, in the job || yes || you &amp;lt;code&amp;gt;scancel&amp;lt;/code&amp;gt; it, or time runs out (see the warning above)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For a shell on a compute node that survives everything, including a login node reboot, and still ends cleanly with the job, see [[Tutorials/Slurm-Persistent-Shell|Persistent Shell on a Compute Node]].&lt;br /&gt;
&lt;br /&gt;
And when you no longer need to watch it at all, write a batch script and use &amp;lt;code&amp;gt;sbatch&amp;lt;/code&amp;gt;. Interactive sessions are for exploring and debugging, and batch jobs are for work.&lt;br /&gt;
&lt;br /&gt;
== Try it yourself ==&lt;br /&gt;
&lt;br /&gt;
# Run &amp;lt;code&amp;gt;salloc --time=00:10:00 -c 2&amp;lt;/code&amp;gt;. In the shell, compare &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;srun hostname&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;nproc&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;srun nproc&amp;lt;/code&amp;gt;. Then &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;, and look at the steps with &amp;lt;code&amp;gt;sacct -j &amp;amp;lt;job ID&amp;amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Book an allocation with &amp;lt;code&amp;gt;--no-shell&amp;lt;/code&amp;gt;, connect twice from two terminals with &amp;lt;code&amp;gt;srun --jobid=... --overlap --pty bash -i&amp;lt;/code&amp;gt;, and check that both prompts show the same node and the same &amp;lt;code&amp;gt;$SLURM_JOB_ID&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Repeat Step 3 for yourself: start &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; inside an &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; step, leave the step, and check whether &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; survived.&lt;br /&gt;
# Follow the pattern in Step 4 with a short &amp;lt;code&amp;gt;--time&amp;lt;/code&amp;gt;. Detach, log out, log back in and attach again. Then end the &amp;lt;code&amp;gt;tmux&amp;lt;/code&amp;gt; session &amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;scancel&amp;lt;/code&amp;gt; the job.&lt;br /&gt;
&lt;br /&gt;
== Cheat sheet ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! You want to... !! Type&lt;br /&gt;
|-&lt;br /&gt;
| book resources with a shell (on the login node) || &amp;lt;code&amp;gt;salloc --time=01:00:00 -c 2 --mem=4G&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| book resources with no shell || &amp;lt;code&amp;gt;salloc --no-shell --time=01:00:00 -c 2 --mem=4G&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| see your jobs and their nodes || &amp;lt;code&amp;gt;squeue --me&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| open a shell in an existing allocation || &amp;lt;code&amp;gt;srun --jobid=&amp;amp;lt;job ID&amp;amp;gt; --overlap --pty bash -i&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| run a command in an existing allocation || &amp;lt;code&amp;gt;srun --jobid=&amp;amp;lt;job ID&amp;amp;gt; --overlap command&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| log in to your job&amp;#039;s node || &amp;lt;code&amp;gt;ssh &amp;amp;lt;node&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| keep a session across disconnects || &amp;lt;code&amp;gt;tmux new -s work&amp;lt;/code&amp;gt;, detach with &amp;lt;code&amp;gt;Ctrl-b d&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tmux attach -t work&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| release the allocation || &amp;lt;code&amp;gt;scancel &amp;amp;lt;job ID&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Slurm-Persistent-Shell|Persistent Shell on a Compute Node]] — the recommended way to keep a session&lt;br /&gt;
* [[Tutorials/Slurm-Interactive-Srun|Interactive Slurm, Part 1: srun]]&lt;br /&gt;
* [[Tutorials/Slurm-Interactive-Shells|Interactive Slurm, Part 2: srun --pty bash and sinteractive]]&lt;br /&gt;
* [[Tutorials/Slurm-Interactive-Sessions|Interactive sessions]] — the beginner tutorial&lt;br /&gt;
* [[Interactive Jobs]] — reference page for &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[Cancelling Jobs]]&lt;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
</feed>