title: Why the SLURM doesn't provide the nodes as is requested?
body: <p>My situation is the cluster consisted of 3 PCs (Raspbian with slurm 18), all connected together with shared file storage, mounted as <code>/storage</code>.</p>
  <p>The task file is <code>/storage/multiple_hello.sh</code>:</p>
  <pre><code>#!/bin/bash
  #SBATCH --ntasks-per-node=1
  #SBATCH --nodes=3 
  #SBATCH --ntasks=3
  cd  /storage
  srun echo &quot;Hello World from $(hostname)&quot; &gt;&gt; ./&quot;$SLURM_JOB_ID&quot;_$(hostname).txt
  </code></pre>
  <p>It is ran as <code>sbatch /storage/multiple_hello.sh</code> and the expected outcome is creating in <code>/storage</code> 3 files named <code>120_node1.txt</code>, <code>121_node2.txt</code> and <code>122_node3.txt</code> (arbitrary job numbers) since:</p>
  <ul>
  <li>3 nodes were requested</li>
  <li>3 tasks were requested</li>
  <li>there was set a limitation for 1 node per task</li>
  </ul>
  <p>Real output: created one file only: <code>120_node1.txt</code></p>
  <p>How to make it work as intended?</p>
  <p>Weird enoughh, the <code>srun --nodes=3 hostname</code> works as expected, and returns:</p>
  <pre><code>node1
  node2
  node3
  </code></pre>