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

[Condor-users] Setting environment variable to hold remote working dir

Hi all,


This concerns Condor 7.8.1 running on Windows (XP).


I stumbled into something that seemed really easy but failed to figure it out… Hope you can help.


I want to store the remote working directory in an environment variable (for later access in a sub-program). I thought I could use the following:


--- submit file ---

universe = vanilla

should_transfer_files = yes

run_as_owner = true

environment = "MY_ENV_VAR=$$(RemoteIwd)"



But when running this the job is held and condor_q –analyze reports


Hold reason: Cannot expand $$ _expression_ (RemoteIwd).


The reason seems to be that $$() is executed on match time, not run time. So how do I solve this??


I can see that Condor sets a number of environment variables, such as TMP, TEMP, TMPDIR, _CONDOR_JOB_IWD etc. But how do I transfer these to MY_ENV_VAR?


All suggestions most welcome!!



PS. The basic reason for this is that the executable that Condor start will move to another location in the file system, but we want to access files copied with transfer_input_files.