1

I am new to SLURM and I want to run two scripts (each of them take 2 minutes to run) in the same time (parallel) on the same node, same socket, but on different cores. I have a system where one node has 2 sockets, and each socket has 10 cores.

Based on what I have read in one other question (SLURM: How can I run different executables on parallel on the same compute node or in different nodes?) I came up with this code:

#!/bin/bash

#SBATCH -J script
#SBATCH --time=00:05:00
#SBATCH --exclusive
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
#SBATCH --cpus-per-task=2
#SBATCH --partition=xeon
#SBATCH --output=OUTPUT.txt
#SBATCH --hint=nomultithread
ml intel
module load openmpi
srun -c 1 --exclusive ./runScript1 &
srun -c 1 --exclusive ./runScript2 &

wait

But when I am typing the squeue --job [jobID] in a repetitive way I see that it takes 4 minutes for the both scripts to execute, which makes me think that they are run sequentially (after the first one is finished, starts the second one).

I have tried also to use taskset to select specific core, but I had some errors.

I am running the script from above using sbatch.

  1. Please tell me if I am assuming wrong or doing something wrong.
  2. It is possible to select a specific core to run on, by including taskset or --cpu-bind option in my code?
thezbx
  • 39
  • 3

0 Answers0