[slurm-users] Reset TMPDIR for All Jobs

Marcus Wagner wagner at itc.rwth-aachen.de
Wed May 13 05:08:12 UTC 2020

Hi Erik,

the output of task-prolog is sourced/evaluated (not really sure, how) in 
the job environment.

Thus you don't have to export a variable in task-prolog, but echo the 
export, e.g.

echo export TMPDIR=/scratch/$SLURM_JOB_ID

The variable will then be set in job environment.


Am 12.05.2020 um 17:40 schrieb Ellestad, Erik:
> I was wanted to set TMPDIR from /tmp to a per job directory I create in 
> local /scratch/$SLURM_JOB_ID (for example)
> This bug suggests I should be able to do this in a task-prolog.
> https://bugs.schedmd.com/show_bug.cgi?id=2664
> However adding the following to task-prolog doesn’t seem to affect the 
> variables the job script is running with.
> unset TMPDIR
> export TMPDIR=/scratch/$SLURM_JOB_ID
> It does work if it is done in the job script, rather than the task-prolog.
> Am I missing something?
> Erik
> --
> Erik Ellestad
> Wynton Cluster SysAdmin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5326 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20200513/746ebbf4/attachment.bin>

More information about the slurm-users mailing list