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?

epascolo
  • 135
  • 2
  • 9

1 Answers1

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.

damienfrancois
  • 52,978
  • 9
  • 96
  • 110