Slurm inline sbatch command submission
Asked Answered
P

1

5

with PBS scheduler is possible launch a batch command without script in this way:

qsub -l select=1:ncpus=12:mem=112GB -l walltime=00:30:00 -- /usr/bin/bash -c "mpirun -np 12 sleep 10"

Is it possible do it in Slurm with sbatch?

Ponce answered 13/12, 2017 at 11:33 Comment(0)
T
10

Yes with the --wrap option:

sbatch ... --wrap "mpirun -np 12 sleep 10"

From the documentation:

--wrap= Sbatch will wrap the specified command string in a simple "sh" shell script, and submit that script to the slurm controller. When --wrap is used, a script name and arguments may not be specified on the command line; instead the sbatch-generated wrapper script is used.

Transmigrate answered 13/12, 2017 at 12:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.