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

Re: [HTCondor-users] set environment in job submit file



Hi Christoph,

There is a special case only for the scratch dir, hidden further down on the condor_submit man page:

As a special case that only works within the submit file environment command, the string $$(CondorScratchDir) is expanded to the value of the jobâs scratch directory. This does not work for scheduler universe or grid universe jobs.

Does this accomplish what you're trying to do?

Jason

On Thu, Nov 27, 2025, 10:08âAM Beyer, Christoph <christoph.beyer@xxxxxxx> wrote:
Hi,

thanks, but the syntax you mention is meant to grab the _CONDOR_SCRATCH_DIR out of the submit environment which is not possible ;)Â

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: "Grassia, Philippe M. (Philippe)" <pgrassia@xxxxxxxxxxx>
An: "Christoph Beyer" <christoph.beyer@xxxxxxx>, "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
CC: "Condor-Users Mail List" <condor-users@xxxxxxxxxxx>
Gesendet: Donnerstag, 27. November 2025 16:20:08
Betreff: Re: set environment in job submit file







According to the docs $ENV resolves environmemt variqbles values at the EPenvironment = "HOME=$ENV(_CONDOR_SCRATCH_DIR)"Â

?

Or use a wrapper script maybeÂ

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Beyer, Christoph <christoph.beyer@xxxxxxx>
Sent: Thursday, November 27, 2025 5:42 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: Condor-Users Mail List <condor-users@xxxxxxxxxxx>
Subject: Re: [HTCondor-users] set environment in job submit file
Â
Hi,

thanks, yes, I know - but the submit environment is not what I target ;)

I want to overwrite the HOME path on the EP and end up with HOME pointing to _CONDOR_SCRATCH_DIR which is something like '/var/lib/condor/execute/dir_123545' ...

_CONDOR_SCRATCH_DIR can only be interpreted on the EP of course as it is not known on the submit side ;)

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

----- UrsprÃngliche Mail -----
Von: "Max Fischer, SCC" <max.fischer@xxxxxxx>
An: "HTCondor-Users Mail List" <htcondor-users@xxxxxxxxxxx>
CC: "Condor-Users Mail List" <condor-users@xxxxxxxxxxx>
Gesendet: Donnerstag, 27. November 2025 14:13:27
Betreff: Re: [HTCondor-users] set environment in job submit file

Hi Christoph,

Not sure if itâll end up doing what you want, but to get a literal '$ sign you have to use '$(DOLLAR)â. If you want to fetch an environment variable from the submit side, thatâs '$ENV(variable)â instead.

See the section MACROS AND COMMENTS in the condor_submit docs [0] for details.

Cheers,
Max

[0]
https://htcondor.readthedocs.io/en/latest/man-pages/condor_submit.html



> On 27. Nov 2025, at 10:48, Beyer, Christoph <christoph.beyer@xxxxxxx> wrote:
>
> Hi,
>
> if I get the manual right something like:
>
> Environment = "HOME=$(_CONDOR_SCRATCH_DIR)"
>
> Should overwrite the $HOME otherwise set by the starter derived from my submit environment because getenv is set to true.
>
> Unfortunately it is not working for me and I tried most of the possible escapes, also setting it to a non-system, individual variable e.g. 'foo' does not work. It seems as if the '$' needs some escaping ?
>
> The best result in some permutation is an empty entry for $HOME ...
>
> This is in condor 24 but I think likewise in 25 ...
>
> 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
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
>
> The archives can be found at: https://www-auth.cs.wisc.edu/lists/htcondor-users/


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

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

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

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

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe

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