[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Job TMP environment variable



MOUNT_UNDER_SCRATCH is exactly the reason why I would like to have all TMP variants pointing to /tmp. It seems to me HTCondor always set these environment variables to the job working directory

https://github.com/htcondor/htcondor/blob/637451a1adee7b3b8c8cb25883f3d68fcb36eb1f/src/condor_starter.V6.1/baseStarter.cpp#L3346-L3348

Thanks for pointing me to job transforms, but in this case environment classAd is probably applied before TMP/TEMP/TMP_DIR gets overwritten by hardcoded working directory. Job environment still looks like
...
TEMP=/scratch/condor/dir_13391
TMP=/scratch/condor/dir_13391
TMPDIR=/scratch/condor/dir_13391
TTT=/tmp5
...
_CONDOR_SCRATCH_DIR=/scratch/condor/dir_13391
...
even thought job classAd contains (from job transforms)
Environment = "TMP=/tmp TEMP=/tmp TTT=/tmp5"

Petr

On 12/22/20 9:44 AM, Thomas Hartmann wrote:
Hi Petr,

maybe a job transform could work to manipulate a job's environment [1]

But maybe you can catch such cases with a bind mount? E.g.,
 # on each batch node
 MOUNT_UNDER_SCRATCH = /tmp, /var/tmp,
would mount for each job both paths in each job's scratch dir.
Advantage imho is also, that the tmps-in-scratch are cleaned up with the job's termination.
But if your job home volume has not as much space available as the generic TMP dirs, jobs could maybe get into space trouble, when they would blow up their TMPs.

Cheers,
 Thomas


[1]

# ad hoc - not tested...
# on the scheduler

JOB_TRANSFORM_NAMES = $(JOB_TRANSFORM_NAMES), SETENVTMPS
JOB_TRANSFORM_SETENVTMPS @=end
[
eval_set_environment = "TMP=/tmp TEMP=/tmp"
]
@end


On 21/12/2020 22.13, Petr Vokac wrote:
Hi,

Is there a way to set job environment variables TMP, TEMP, TMPDIR to
/tmp (vanilla universe, no containers)?

Petr
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/



_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/