<?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=Interactive_Jobs</id>
	<title>Interactive Jobs - 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=Interactive_Jobs"/>
	<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Interactive_Jobs&amp;action=history"/>
	<updated>2026-06-20T14:03:17Z</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=Interactive_Jobs&amp;diff=2742&amp;oldid=prev</id>
		<title>Haars0011: Phase 1 § 4 P1.4.5: split Interactive Jobs out of Using Slurm § sinteractive + § salloc (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.anunna.wur.nl/index.php?title=Interactive_Jobs&amp;diff=2742&amp;oldid=prev"/>
		<updated>2026-06-16T09:19:32Z</updated>

		<summary type="html">&lt;p&gt;Phase 1 § 4 P1.4.5: split Interactive Jobs out of Using Slurm § sinteractive + § salloc (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;For quick exploration on a compute node — testing a snippet, profiling memory usage, debugging an environment — request an interactive shell instead of submitting a batch job. SLURM offers two commands for this: &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt;, which drops you straight into a shell on a compute node, and &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt;, which reserves resources you can use from the login node.&lt;br /&gt;
&lt;br /&gt;
== sinteractive ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; is a thin wrapper on &amp;lt;code&amp;gt;srun&amp;lt;/code&amp;gt; that requests an allocation and gives you a shell on the allocated node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sinteractive -c &amp;lt;num_cpus&amp;gt; --mem &amp;lt;amount_mem&amp;gt; --time &amp;lt;minutes&amp;gt; -p &amp;lt;partition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After SLURM allocates resources you land at a new shell prompt on a compute node — run &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; to confirm which one. From there, run commands as you would in any shell; the allocation ends when you exit.&lt;br /&gt;
&lt;br /&gt;
If you run &amp;lt;code&amp;gt;sinteractive&amp;lt;/code&amp;gt; with no flags, you get a default allocation of 1 CPU, 100 MB of memory, and 1 hour of wall time. That is fine for a quick test but too small for real work.&lt;br /&gt;
&lt;br /&gt;
=== Wrapper source ===&lt;br /&gt;
&lt;br /&gt;
The wrapper itself is a four-line shell script:&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;
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;
The flags translate to: time out the allocation request after 60 seconds (&amp;lt;code&amp;gt;-I60&amp;lt;/code&amp;gt;), one node (&amp;lt;code&amp;gt;-N 1&amp;lt;/code&amp;gt;), one task (&amp;lt;code&amp;gt;-n 1&amp;lt;/code&amp;gt;), and a pseudo-terminal running an interactive bash (&amp;lt;code&amp;gt;--pty bash -i&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== salloc ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; requests resources without immediately running anything. Use it when you want to keep your shell on the login node and dispatch tasks into the allocation as you go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
salloc -p main --time=2:00:00&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the allocation is granted, launch tasks 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 &amp;lt;command&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default &amp;lt;code&amp;gt;salloc&amp;lt;/code&amp;gt; wall time is 1 hour. For longer sessions add &amp;lt;code&amp;gt;--time&amp;lt;/code&amp;gt; as in the example above.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Partitions / Queues]]&lt;br /&gt;
* [[Choosing a node (constraints)]]&lt;br /&gt;
* [[Cancelling Jobs]]&lt;br /&gt;
* [[Using Slurm | Scheduler overview]]&lt;br /&gt;
* [https://slurm.schedmd.com/salloc.html salloc documentation]&lt;/div&gt;</summary>
		<author><name>Haars0011</name></author>
	</entry>
</feed>