Re: [slurm-users] set SLURM_JOB_NAME programmatically from within job script

2018-03-23 Thread Andreas Hilboll
Hi Jessica, thanks a lot for your help and good explanation - scontrol update job=$SLURM_JOB_ID name=myname does exactly what I want :) Cheers, Andreas Jessica Nettelblad writes: Hi Andreas, The Slurm controller has job names in its own data structure. The Slurm controller job nam

Re: [slurm-users] set SLURM_JOB_NAME programmatically from within job script

2018-03-23 Thread Jessica Nettelblad
Hi Andreas, The Slurm controller has job names in its own data structure. The Slurm controller job name is set to the name of the job script by default, or to a name you define for example with -J. The environment variable SLURM_JOB_NAME is then set to this Slurm controller job name by job start.

Re: [slurm-users] set SLURM_JOB_NAME programmatically from within job script

2018-03-22 Thread Chris Samuel
On Friday, 23 March 2018 8:16:01 AM AEDT Andreas Hilboll wrote: > Is this somehow possible? When I tried the above approach, it > didn't work (squeue reported the job's name to be 'myscript.sh'). It needs to be set before submission for sbatch to use it, a script cannot affect the environment o

Re: [slurm-users] set SLURM_JOB_NAME programmatically from within job script

2018-03-22 Thread Vicker, Darby (JSC-EG311)
lboll Reply-To: Slurm User Community List Date: Thursday, March 22, 2018 at 4:28 PM To: "slurm-users@lists.schedmd.com" Subject: [slurm-users] set SLURM_JOB_NAME programmatically from within job script Hi, I'd like to be able to set the SLURM_JOB_NAME from within the sc

[slurm-users] set SLURM_JOB_NAME programmatically from within job script

2018-03-22 Thread Andreas Hilboll
Hi, I'd like to be able to set the SLURM_JOB_NAME from within the script I'm submitting to `sbatch`. So, e.g., with the script `myscript.sh`, #!/bin/bash export SLURM_JOB_NAME='myname' sleep 120 and then `sbatch myscript.sh`, I'd like the job's name to be 'myname'. Is this someh