title: How to create a batch script, which submitts several jobs and allocates each of the this jobs on a separate node?
body: <p>I am new to HPC and SLURM especially, and i ran into some troubles.</p>
  <p>I was provided with acces to a HPC cluster with 32 CPUs on each node. In order to do the needed calculations I made 12 Python multiprocessing Scripts, where each Script uses excactly 32 CPU's.
  How, instead of starting each Script manually in the interactive modus ( which is also an option btw. but it takes a lot of time) I decided to write a Batch Script in order to start all my 12 Scripts automatically.</p>
  <p>//SCRIPT//</p>
  <p>#!/bin/bash</p>
  <p>#SBATCH --job-name=job_name</p>
  <p>#SBATCH --partition=partition</p>
  <p>#SBATCH --nodes=1</p>
  <p>#SBATCH --time=47:59:59</p>
  <p>#SBATCH --export=NONE</p>
  <p>#SBATCH --array=1-12</p>
  <p>module switch env env/system-gcc
  module load python/3.8.5</p>
  <p>source /home/user/env/bin/activate</p>
  <p>python3.8 $HOME/Script_directory/Script$SLURM_ARRAY_TASK_ID.py</p>
  <p>exit</p>
  <p>//UNSCRIPT//</p>
  <p>But as far as i understand, this script would start all of the Jobs from the Array on the same node and thus the underlying python scripts might start a &quot;fight&quot; for the available CPU's and thus slow down.</p>
  <p>How should i modify my bash file in Order to start each task from the array on a separate node?</p>
  <p>Thanks in advance!</p>