Hi! A simple solution would be do:
SBATCH="#SBATCH" cat << EOF ... $SBATCH --nodes=1 EOF /Magnus On 2015-04-21 13:50, Hendryk Bockelmann wrote:
Hello, is there a way to prevent slurm from parsing the whole jobscript for #SBATCH statements? Assume I have the following jobscript "job1.sh": #!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --job-name=job1 srun -l echo "slurm jobid $SLURM_JOB_ID named: $SLURM_JOB_NAME" cat > job2.sh <<EOF #!/bin/bash #SBATCH --nodes=1 #SBATCH --ntasks=2 #SBATCH --job-name=job2 srun -l echo "slurm jobid \$SLURM_JOB_ID named: \$SLURM_JOB_NAME" EOF sbatch job2.sh If I submit the job1.sh the resources are allocated such that 2 tasks are given and not 1. I would like to have 1 task for the first job (as in the very first lines) and then a different setting for the created job ... Thanx for any help, Hendryk
-- Magnus Jonsson, Developer, HPC2N, UmeƄ Universitet
smime.p7s
Description: S/MIME Cryptographic Signature