On Wed, Jun 15, 2022 at 02:20:56PM +0200, Guillaume De Nayer wrote: > In order to solve this problem I'm trying to start some subtasks with > srun inside a batch job (without mpirun for now): > > #!/bin/bash > #SBATCH --job-name=test_multi_prog_srun > #SBATCH --nodes=1 > #SBATCH --partition=short > #SBATCH --time=02:00:00 > #SBATCH --exclusive > > srun -vvv --exact -n1 -c1 sleep 20 > srun1.log 2>&1 & > srun -vvv --exact -n1 -c1 sleep 30 > srun2.log 2>&1 & > wait > > > However, only one task runs. The second is waiting for the completion of > the first task to start. > > Can someone explain me, what I'm doing wrong?
I think this is because the value for sbatch(1)'s -n (or --ntasks) is 1 (per node) by default. > Thx in advance, > Regards, Kind regards > Guillaume Frank