[slurm-users] Reset TMPDIR for All Jobs
wagner at itc.rwth-aachen.de
Thu May 14 05:12:35 UTC 2020
To be honest, they *somewhat* documented that, but it could be clearer,
that user environment modification can only be done via task-prolog:
> The task prolog is executed with the same environment as the user tasks to be initiated. The standard output of that program is read and processed as follows:
> export name=value sets an environment variable for the user task
> unset name clears an environment variable from the user task
> print ... writes to the task's standard output.
> The above functionality is limited to the task prolog script.
You should also have in mind, that the task-prolog runs for EVERY task,
something, we had to learn painfully.
Am 13.05.2020 um 17:18 schrieb Ellestad, Erik:
> Thanks Marcus, that works.
> Though, ahem, SLURM/SchedMD, if you're listening, would it hurt to cover this in the documentation regarding prolog/epilog, and maybe give an example?
> Just a thought,
> Erik Ellestad
> Wynton Cluster SysAdmin
> -----Original Message-----
> From: slurm-users <slurm-users-bounces at lists.schedmd.com> On Behalf Of Marcus Wagner
> Sent: Tuesday, May 12, 2020 10:08 PM
> To: slurm-users at lists.schedmd.com
> Subject: Re: [slurm-users] Reset TMPDIR for All Jobs
> 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.
>> 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 Ellestad
>> Wynton Cluster SysAdmin
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5326 bytes
Desc: S/MIME Cryptographic Signature
More information about the slurm-users