I have a very simple script:
#!/bin/bash -l
#SBATCH --mem=350000
#SBATCH --time=96:00:00
#SBATCH --nodes=1
#SBATCH --cpus-per-task=4

srun date

It acts exactly like I expect with srun:
$ srun -p bigmemh ./bill.sh
srun: job 10669645 queued and waiting for resources
srun: job 10669645 has been allocated resources
Module slurm/16.05.8 loaded
Module openmpi/2.0.1 loaded
Fri Jan 27 13:52:37 PST 2017
$

So 4 CPUs are allocated, but the binary is run once. If I used -n 4 I'd expect the binary to be run 4 times.

But now with sbatch:
$ sbatch -p bigmemh ./bill.sh
Submitted batch job 10669647
$ cat slurm-10669647.out
==========================================
SLURM_JOB_ID = 10669647
SLURM_NODELIST = bigmem8
==========================================
Module slurm/16.05.8 loaded
Module openmpi/2.0.1 loaded
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017
Fri Jan 27 13:54:07 PST 2017

Reply via email to