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

Re: [HTCondor-users] Job TMP environment variable



Hi,

have you tried 'getenv = True' in the submit file ?

This should definetely transfere your local environment to the workernode (apart from LD_LIBRARY_PATH).

Also not a solution but a test scenario:

<submit file>
executable = /usr/bin/sleep
Arguments = 80
Environment="TMP=/tmp TTMP=/tmp5"
queue 1

`condor_submit -i`

gives:
[chbeyer@bird831]/afs/desy.de/user/c/chbeyer/htcondor/testjobs% echo $TTMP
/tmp5
[chbeyer@bird831]/afs/desy.de/user/c/chbeyer/htcondor/testjobs% echo $TMP

Hence individual settings no problem, syntax OK, in my case maybe $TMP does not get set because we use 'mount_under_scratch' for tmp (very conveniant thing todo by the way) ...

Did you check the TEMP_DIR & TMP_DIR variables on your workernode as the path you get seems more likely to be set somewhere in condor than anywhere else ... ? 

Best
christoph



--
Christoph Beyer
DESY Hamburg
IT-Department

Notkestr. 85
Building 02b, Room 009
22607 Hamburg

phone:+49-(0)40-8998-2317
mail: christoph.beyer@xxxxxxx


Von: "Petr Vokac" <petr.vokac@xxxxxxx>
An: "htcondor-users" <htcondor-users@xxxxxxxxxxx>, "Thomas Hartmann" <thomas.hartmann@xxxxxxx>
Gesendet: Dienstag, 22. Dezember 2020 13:14:26
Betreff: 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/


_______________________________________________
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/