We implemented a hack for things like this earlier. Basically, what it did was
salloc $slurmargs /usr/bin/srun --ntasks=1 --nodes=1 --preserve-env $script where $slurmargs is the job specifications (--ntasks, etc.), and $script the script to execute (note that any #SBATCH lines in the script will _not_ be take into account; all specifications must be in $slurmargs). The salloc command will wait until the command ($script) has finished before exiting. (We did have some problems when using srun inside the script, but I believe mpirun should work.) -- Regards, Bjørn-Helge Mevik, dr. scient, Department for Research Computing, University of Oslo
