<?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-Shells</id>
	<title>Tutorials/Slurm-Interactive-Shells - 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-Shells"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Shells&amp;action=history"/>
	<updated>2026-11-24T05:32:32Z</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-Shells&amp;diff=3293&amp;oldid=prev</id>
		<title>Honfi001 at 11:13, 23 November 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Shells&amp;diff=3293&amp;oldid=prev"/>
		<updated>2026-11-23T11:13:35Z</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:13, 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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;= Interactive Slurm, Part 2: srun --pty bash and sinteractive =&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;= Interactive Slurm, Part 2: srun --pty bash and sinteractive =&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;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; 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;&#039;&#039;Part 2 of the &#039;&#039;&#039;Interactive Slurm&#039;&#039;&#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 Part 3 covers &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;.&#039;&#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;&#039;&#039;Part 2 of the &#039;&#039;&#039;Interactive Slurm&#039;&#039;&#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 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Tutorials/Slurm-Interactive-Salloc|&lt;/ins&gt;Part 3&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;covers &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;.&#039;&#039;&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;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;In [[Tutorials/Slurm-Interactive-Srun|Part 1]] every &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; ran one command and gave the compute node straight back. That is perfect for a single command, and tiresome when you want to look around, try something, fix it and try again. This page shows how to get a whole &amp;#039;&amp;#039;&amp;#039;shell&amp;#039;&amp;#039;&amp;#039; on a compute node, so that you can type one command after another there, and how &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; fits in.&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;In [[Tutorials/Slurm-Interactive-Srun|Part 1]] every &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; ran one command and gave the compute node straight back. That is perfect for a single command, and tiresome when you want to look around, try something, fix it and try again. This page shows how to get a whole &amp;#039;&amp;#039;&amp;#039;shell&amp;#039;&amp;#039;&amp;#039; on a compute node, so that you can type one command after another there, and how &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; fits in.&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-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;srun: job 44376925 queued and waiting for resources&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;srun: job 44376925 queued and waiting for resources&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;srun: job 44376925 has been allocated resources&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;srun: job 44376925 has been allocated resources&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:~$ nproc&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:~$ nproc&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;2&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;2&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:~$ 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;@node114:~$ 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;44376925&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;44376925&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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l123&quot;&gt;Line 123:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 123:&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;srun: job 44376926 queued and waiting for resources&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;srun: job 44376926 queued and waiting for resources&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;srun: job 44376926 has been allocated resources&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;srun: job 44376926 has been allocated resources&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:~$ nproc&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;user&lt;/ins&gt;@node114:~$ nproc&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;2&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;2&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:~$ scontrol show job $SLURM_JOB_ID | grep -o &#039;TRES=[^ ]*&#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:~$ scontrol show job $SLURM_JOB_ID | grep -o &#039;TRES=[^ ]*&#039;&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;TRES=cpu=2,mem=100M,node=1,billing=2&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;TRES=cpu=2,mem=100M,node=1,billing=2&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;TRES=cpu=2,mem=100M,node=1,billing=2&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;TRES=cpu=2,mem=100M,node=1,billing=2&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;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l137&quot;&gt;Line 137:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 137:&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;srun: job 44376927 queued and waiting for resources&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;srun: job 44376927 queued and waiting for resources&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;srun: job 44376927 has been allocated resources&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;srun: job 44376927 has been allocated resources&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:~$ nproc&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:~$ nproc&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;1&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;1&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:~$ scontrol show job $SLURM_JOB_ID | grep -o &#039;TRES=[^ ]*&#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:~$ scontrol show job $SLURM_JOB_ID | grep -o &#039;TRES=[^ ]*&#039;&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;TRES=cpu=1,mem=100M,node=1,billing=1&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;TRES=cpu=1,mem=100M,node=1,billing=1&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;TRES=cpu=1,mem=100M,node=1,billing=1&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;TRES=cpu=1,mem=100M,node=1,billing=1&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-Shells&amp;diff=3286&amp;oldid=prev</id>
		<title>Honfi001: Created page with &quot;= Interactive Slurm, Part 2: srun --pty bash and sinteractive =  &#039;&#039;Part 2 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 3 covers &lt;code&gt;salloc&lt;/code&gt;.&#039;&#039;  In Part 1 every &lt;code&gt;srun&lt;/code&gt; ran one command and gave the compute node straight back. That is perfect for a single command, and tiresome when you want to look around, try something...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Tutorials/Slurm-Interactive-Shells&amp;diff=3286&amp;oldid=prev"/>
		<updated>2026-11-23T10:57:26Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Interactive Slurm, Part 2: srun --pty bash and sinteractive =  &amp;#039;&amp;#039;Part 2 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 Part 3 covers &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;.&amp;#039;&amp;#039;  In &lt;a href=&quot;/Tutorials/Slurm-Interactive-Srun&quot; title=&quot;Tutorials/Slurm-Interactive-Srun&quot;&gt;Part 1&lt;/a&gt; every &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; ran one command and gave the compute node straight back. That is perfect for a single command, and tiresome when you want to look around, try something...&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 2: srun --pty bash and sinteractive =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Part 2 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 Part 3 covers &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In [[Tutorials/Slurm-Interactive-Srun|Part 1]] every &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; ran one command and gave the compute node straight back. That is perfect for a single command, and tiresome when you want to look around, try something, fix it and try again. This page shows how to get a whole &amp;#039;&amp;#039;&amp;#039;shell&amp;#039;&amp;#039;&amp;#039; on a compute node, so that you can type one command after another there, and how &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; fits in.&lt;br /&gt;
&lt;br /&gt;
By the end of this page you will be able to:&lt;br /&gt;
&lt;br /&gt;
* open an interactive shell on a compute node with &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;;&lt;br /&gt;
* explain what &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; does, because you will have read all of it;&lt;br /&gt;
* recognise the defaults you get when you do not ask, and why you should always ask;&lt;br /&gt;
* see your job and its steps in &amp;lt;code&amp;gt;sacct&amp;lt;/code&amp;gt;.&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]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Time:&amp;#039;&amp;#039;&amp;#039; about 30 minutes.&lt;br /&gt;
&lt;br /&gt;
== Step 1: A shell on a compute node ==&lt;br /&gt;
&lt;br /&gt;
Here is the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --time=00:05:00 -c 2 --pty bash -i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You already know &amp;lt;code&amp;gt;--time&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt;. The new parts are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;: the program to run on the compute node is a shell, the same program that reads your commands on the login node;&lt;br /&gt;
* &amp;lt;code&amp;gt;--pty&amp;lt;/code&amp;gt;: connect &amp;#039;&amp;#039;&amp;#039;your keyboard and screen&amp;#039;&amp;#039;&amp;#039; to that program, so that it behaves like a normal terminal;&lt;br /&gt;
* &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt;: tell &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; it is interactive, so you get a prompt.&lt;br /&gt;
&lt;br /&gt;
In restaurant terms from Part 1: you book a table, and the one dish you order is &amp;quot;a waiter who stays at my table and takes orders until I leave&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is a real session. The lines after the prompt (&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;) are what we typed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
srun: job 44376925 queued and waiting for resources&lt;br /&gt;
srun: job 44376925 has been allocated resources&lt;br /&gt;
honfi001@node114:~$ hostname&lt;br /&gt;
node114&lt;br /&gt;
honfi001@node114:~$ nproc&lt;br /&gt;
2&lt;br /&gt;
honfi001@node114:~$ echo $SLURM_JOB_ID&lt;br /&gt;
44376925&lt;br /&gt;
honfi001@node114:~$ exit&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look at the prompt: it says &amp;lt;code&amp;gt;node114&amp;lt;/code&amp;gt;, not the login node. Everything you type now runs on the compute node, with the two cores you asked for, until you type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; or press &amp;lt;code&amp;gt;Ctrl-D&amp;lt;/code&amp;gt;. Then you are back on the login node, and the allocation is released.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Your terminal must stay open.&amp;#039;&amp;#039;&amp;#039; The shell lives only as long as your connection to it. If you close your laptop or your connection drops, the shell ends and the allocation is released. Part 3 is about what to do when that is a problem.&lt;br /&gt;
&lt;br /&gt;
== Step 2: What did you actually get? ==&lt;br /&gt;
&lt;br /&gt;
Inside a job, Slurm can tell you exactly what it reserved for you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
scontrol show job $SLURM_JOB_ID | grep -o &amp;#039;TRES=[^ ]*&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;
TRES=cpu=2,mem=100M,node=1,billing=2&lt;br /&gt;
TRES=cpu=2,mem=100M,node=1,billing=2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(It prints twice: once for what you asked for and once for what you were given.) Two CPUs, as requested, and one node. But look at the memory: &amp;#039;&amp;#039;&amp;#039;100M, which is 100 megabytes&amp;#039;&amp;#039;&amp;#039;. We never asked for memory, so we got the default.&lt;br /&gt;
&lt;br /&gt;
=== The defaults are small on purpose ===&lt;br /&gt;
&lt;br /&gt;
On Anunna&amp;#039;s default partition, a job that does not say what it needs gets:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Resource !! Default if you do not ask !! Ask with&lt;br /&gt;
|-&lt;br /&gt;
| CPU cores || 1 || &amp;lt;code&amp;gt;-c 4&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Memory || 100 MB || &amp;lt;code&amp;gt;--mem=4G&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Time || 1 hour || &amp;lt;code&amp;gt;--time=02:00:00&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
100 MB is enough for &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nproc&amp;lt;/code&amp;gt;, and too little for most real work: many programs need more than that just to start, and loading a dataset into R or Python will need far more. So for anything beyond a quick look, &amp;#039;&amp;#039;&amp;#039;always say how much memory you need&amp;#039;&amp;#039;&amp;#039;, as well as cores and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
srun --time=01:00:00 -c 2 --mem=4G --pty bash -i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 3: sinteractive is srun ==&lt;br /&gt;
&lt;br /&gt;
Anunna has a command called &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt;. It is not part of Slurm. It is a small script written for this cluster, and here is the whole thing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#Written by Gwen Dawes, 050117&lt;br /&gt;
#Why isn&amp;#039;t this in the base install?&lt;br /&gt;
srun &amp;quot;$@&amp;quot; -I60 -N 1 -n 1 --pty bash -i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One line of real work. &amp;lt;code&amp;gt;&amp;quot;$@&amp;quot;&amp;lt;/code&amp;gt; means &amp;quot;whatever options you typed&amp;quot;, and the rest you can now read yourself:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Part !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;$@&amp;quot;&amp;lt;/code&amp;gt; || your options, such as &amp;lt;code&amp;gt;-c 2 --mem=4G --time=01:00:00&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-I60&amp;lt;/code&amp;gt; || short for &amp;lt;code&amp;gt;--immediate=60&amp;lt;/code&amp;gt;: if Slurm cannot find room within 60 seconds, give up instead of waiting in the queue&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-N 1 -n 1&amp;lt;/code&amp;gt; || one node, one task: a single shell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--pty bash -i&amp;lt;/code&amp;gt; || exactly what you typed in Step 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
So these two commands do the same job, except that &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; gives up after a minute if the cluster is busy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sinteractive --time=00:05:00 -c 2&lt;br /&gt;
srun --time=00:05:00 -c 2 -N 1 -n 1 --pty bash -i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here is the &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; session (shortened to the interesting lines):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
srun: job 44376926 queued and waiting for resources&lt;br /&gt;
srun: job 44376926 has been allocated resources&lt;br /&gt;
honfi001@node114:~$ nproc&lt;br /&gt;
2&lt;br /&gt;
honfi001@node114:~$ scontrol show job $SLURM_JOB_ID | grep -o &amp;#039;TRES=[^ ]*&amp;#039;&lt;br /&gt;
TRES=cpu=2,mem=100M,node=1,billing=2&lt;br /&gt;
TRES=cpu=2,mem=100M,node=1,billing=2&lt;br /&gt;
honfi001@node114:~$ exit&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Even the messages come from &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt;, because &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; is what is running. And typing just &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt;, with no options at all, gets you exactly the defaults from the table above (again shortened):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
srun: job 44376927 queued and waiting for resources&lt;br /&gt;
srun: job 44376927 has been allocated resources&lt;br /&gt;
honfi001@node114:~$ nproc&lt;br /&gt;
1&lt;br /&gt;
honfi001@node114:~$ scontrol show job $SLURM_JOB_ID | grep -o &amp;#039;TRES=[^ ]*&amp;#039;&lt;br /&gt;
TRES=cpu=1,mem=100M,node=1,billing=1&lt;br /&gt;
TRES=cpu=1,mem=100M,node=1,billing=1&lt;br /&gt;
honfi001@node114:~$ exit&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One core, 100 MB, and (as &amp;lt;code&amp;gt;sacct&amp;lt;/code&amp;gt; will show in a moment) one hour.&lt;br /&gt;
&lt;br /&gt;
=== Which should I use? ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! !! &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;srun --pty bash -i&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Exists on || this cluster (a local script) || every Slurm cluster&lt;br /&gt;
|-&lt;br /&gt;
| If the cluster is busy || gives up after 60 seconds || waits in the queue until it starts&lt;br /&gt;
|-&lt;br /&gt;
| Number of tasks and nodes || one, set by the script || your choice&lt;br /&gt;
|-&lt;br /&gt;
| Shorter to type || yes || no&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Use &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; for everyday work on Anunna. Knowing that it is &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; underneath means that you can still work when you move to another cluster, and that you can make it wait in the queue when you need a large node and a minute is not enough.&lt;br /&gt;
&lt;br /&gt;
== Step 4: Your session, seen from outside ==&lt;br /&gt;
&lt;br /&gt;
After you leave, &amp;lt;code&amp;gt;sacct&amp;lt;/code&amp;gt; shows what happened. Here are the three sessions from this page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sacct -j 44376925,44376926,44376927 -o JobID%14,JobName%10,Timelimit,Elapsed,State,NodeList&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  Timelimit    Elapsed      State        NodeList&lt;br /&gt;
-------------- ---------- ---------- ---------- ---------- ---------------&lt;br /&gt;
      44376925       bash   00:05:00   00:00:09  COMPLETED         node114&lt;br /&gt;
44376925.exte+     extern              00:00:09  COMPLETED         node114&lt;br /&gt;
    44376925.0       bash              00:00:08  COMPLETED         node114&lt;br /&gt;
      44376926       bash   00:05:00   00:00:07  COMPLETED         node114&lt;br /&gt;
44376926.exte+     extern              00:00:08  COMPLETED         node114&lt;br /&gt;
    44376926.0       bash              00:00:08  COMPLETED         node114&lt;br /&gt;
      44376927       bash   01:00:00   00:00:08  COMPLETED         node114&lt;br /&gt;
44376927.exte+     extern              00:00:08  COMPLETED         node114&lt;br /&gt;
    44376927.0       bash              00:00:08  COMPLETED         node114&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Three things to notice:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Each session is a job with a step.&amp;#039;&amp;#039;&amp;#039; The plain line (&amp;lt;code&amp;gt;44376925&amp;lt;/code&amp;gt;) is the &amp;#039;&amp;#039;&amp;#039;allocation&amp;#039;&amp;#039;&amp;#039;, the table. The line ending in &amp;lt;code&amp;gt;.0&amp;lt;/code&amp;gt; is the &amp;#039;&amp;#039;&amp;#039;step&amp;#039;&amp;#039;&amp;#039; that ran inside it, your &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;. This is the &amp;quot;one allocation plus one step&amp;quot; from Part 1, made visible. (The &amp;lt;code&amp;gt;extern&amp;lt;/code&amp;gt; line is Slurm&amp;#039;s own bookkeeping step for processes that join the job from outside. You can ignore it here.)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Leaving ends the allocation.&amp;#039;&amp;#039;&amp;#039; We booked five minutes, used about eight seconds, and the job ended the moment we typed &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;. It did not sit there holding the node for the rest of the five minutes.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The bare &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; got a one-hour limit&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;01:00:00&amp;lt;/code&amp;gt;), which is the default.&lt;br /&gt;
&lt;br /&gt;
== Try it yourself ==&lt;br /&gt;
&lt;br /&gt;
# Open a shell with &amp;lt;code&amp;gt;srun --time=00:10:00 -c 2 --mem=1G --pty bash -i&amp;lt;/code&amp;gt;. Check &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nproc&amp;lt;/code&amp;gt;, and the &amp;lt;code&amp;gt;TRES&amp;lt;/code&amp;gt; line. Does the memory match what you asked for?&lt;br /&gt;
# Inside that shell, run &amp;lt;code&amp;gt;srun hostname&amp;lt;/code&amp;gt;. What happens, and how many cores does it use? (Hint: you are already inside an allocation.)&lt;br /&gt;
# Exit, then run &amp;lt;code&amp;gt;sacct -j &amp;amp;lt;your job ID&amp;amp;gt;&amp;lt;/code&amp;gt;. How many steps do you see now, and why?&lt;br /&gt;
# Run &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; with no options and check what you got. Would that be enough to load a 2 GB file?&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;
| a shell on a compute node (Anunna) || &amp;lt;code&amp;gt;sinteractive --time=01:00:00 -c 2 --mem=4G&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| the same on any Slurm cluster || &amp;lt;code&amp;gt;srun --time=01:00:00 -c 2 --mem=4G --pty bash -i&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| check what you were given || &amp;lt;code&amp;gt;scontrol show job $SLURM_JOB_ID&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| leave and release the node || &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ctrl-D&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| see your job and its steps afterwards || &amp;lt;code&amp;gt;sacct -j &amp;amp;lt;job ID&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Next ==&lt;br /&gt;
&lt;br /&gt;
Everything so far ties the allocation to one connection: when your shell ends, your table is given back. In &amp;#039;&amp;#039;&amp;#039;Part 3&amp;#039;&amp;#039;&amp;#039; you will pull those apart with &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;: book the table first, then order as many steps as you like, from as many terminals as you like.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Tutorials/Slurm-Interactive-Srun|Interactive Slurm, Part 1: srun]]&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;/div&gt;</summary>
		<author><name>Honfi001</name></author>
	</entry>
</feed>