[slurm-users] Job error when using --job-name=`basename $PWD`

2019-07-28 Thread Verzelloni Fabio
Hi Everyone, I'm experiencing a weird issue, when submitting a job like that: - #!/bin/bash #SBATCH --job-name=`basename $PWD` #SBATCH --ntasks=2 srun -n 2 hostname - Output: srun: error: Unable to create step for job 15387: More processors requested

Re: [slurm-users] Job error when using --job-name=`basename $PWD`

2019-07-28 Thread Marcus Boden
Hi Fabio, are you sure that command substition works in the #SBATCH part of the jobscript? I don't think that slurm actally evaluates that, though I might be wrong. It seems like the #SBATCH after the --job-name line are not evaluated anymore, therefore you can't start srun with two tasks (since

Re: [slurm-users] Job error when using --job-name=`basename $PWD`

2019-07-29 Thread Sven Hansen
Hi Fabio, SLURM does not support usual shell expression evaluation or arbitrary variable substitution within #SBATCH arguments. If the option parser comes across options it does not understand, it tends to abort and assumes default settings for all mandatory unset options. This can be nasty f

Re: [slurm-users] Job error when using --job-name=`basename $PWD`

2019-07-29 Thread Brian Andrus
Yeah, you can't do that in that fashion. If you want to do that, I'd suggest you put the option in the sbatch command you use to submit the script so: sbatch --job-name=`basename $PWD` /path/to/script.sh Brian Andrus On 7/28/2019 10:51 PM, Verzelloni Fabio wrote: Hi Everyone, I'm experien

Re: [slurm-users] Job error when using --job-name=`basename $PWD`

2019-07-29 Thread Verzelloni Fabio
Dear Sven, thanks for the clarification. Fabio On 29.07.19, 11:44, "slurm-users on behalf of Sven Hansen" wrote: Hi Fabio, SLURM does not support usual shell expression evaluation or arbitrary variable substitution within #SBATCH arguments. If the option parser comes ac