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

Re: [Condor-users] How to do $REMOTE_ENV(...) for execute side environment resolution?



Ian,

Two things that may be of use to you:

STARTER_JOB_ENVIRONMENT - allows you to poke stuff into the job's environment from the configuration file on the execute node.

$$ - allows you to insert stuff into the environment/args of the job from the machine ClassAd.

To use $$, you would need the machine ClassAd to advertise attributes containing the values you want. Example configuration file:

FOO="blah"
STARTD_ATTRS = $(STARTD_ATTRS) FOO

And then when you submit the job:

environment = FOO=$$(FOO)

--Dan

Ian Stokes-Rees wrote:
When my job runs on a worker node, the remote environment of that node will contain an environment variable FOO.

I would like to have my classad expand this remote environment variable prior executing. E.g.

Executable = $ENV(HOME)/scripts/run.sh
Arguments = $REMOTE_ENV(FOO);

Is there some way to do this? I can't find any reference, and my only solution right now seems to be to write *YET* another wrapper around run.sh that will do the local environment expansion first.

Another example would be:

Environment = PYTHONPATH=$REMOTE_ENV(PYTHONPATH):$REMOTE_ENV(BAR)/lib/python;
Executable = $ENV(HOME)/scripts/run.py

Do envioronment variable referneces get expanded before setting the environment? Or for arguments or executables? Could I do something like:

Arguments = $(DOLLAR)FOO/data/details.dat

and have that expand to the execute node's $FOO/data/details.dat?

Ian

--
Ian Stokes-Rees                            W: http://sbgrid.org
ijstokes@xxxxxxxxxxxxxxxxxxx               T: +1 617 432-5608 x75
SBGrid, Harvard Medical School             F: +1 617 432-5600

------------------------------------------------------------------------

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

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