Configuring the job environment¶
HTCondor provides extremely detailed control over the environment in which a job is executed.
Default job environment¶
By default a job does not inherit any environment settings from the access point (the submit host), nor from the login profile of the job owner (user). The only environment variables assigned will be those set by HTCondor itself.
For full details on which environment variables are configured by default, see
https://htcondor.readthedocs.io/en/lts/users-manual/services-for-jobs.html#environment-variables.
The default job environment is extremely limited
The default job environment set by HTCondor is basically empty. In particular, 'standard' variables such as HOME
, PATH
, and USER
are not included by default.
Setting environment variables¶
Extra enviromment variables should be set for jobs via the environment
submit command.
For full details of the syntax of the environment
command, please see
https://htcondor.readthedocs.io/en/lts/man-pages/condor_submit.html#:~:text=environment%20%3D
Setting environment variables for a job
environment = "KEY=VALUE KEY2='another value'"
This produces the following environment entries:
KEY=VALUE
KEY2=another value
Setting environment
for discovering and reading IGWN data
For jobs that use GWDataFind to discover the locations of data, it may be sufficient to set:
environment = "GWDATAFIND_SERVER=datafind.igwn.org"
This may need to be combined with the relevant options for configuring credentials in order to actually read the data paths returned by GWDataFind.
Inheriting environment variables from the access point¶
Environment variables can be copied at the time of job submission using the getenv
submit command.
For full details of the syntax of the getenv
command, please see
https://htcondor.readthedocs.io/en/lts/man-pages/condor_submit.html#:~:text=getenv%20%3D
Copying environment variables to enable local data access
For jobs that wish to access local data files (rather than CVMFS-distributed data), on the LDAS systems at CIT, LHO, or CIT, it may be sufficient to set
getenv = DEFAULT_SEGMENT_SERVER, GWDATAFIND_SERVER, NDSSERVER
to copy these settings from the login environment provided by the local administrators.
The environment variables in the above example have the following uses:
Variable | Description |
---|---|
DEFAULT_SEGMENT_SERVER | the address of the default DQSegDB server |
GWDATAFIND_SERVER | the address of the default GWDataFind server |
NDSSERVER | the address (or : -separated list of addresses) of the default NDS2 server |
Using getenv = true
is unsupported
condor_submit
supports specifying getenv = True
as a proxy for getenv = *
, effectively copying the submit environment to the job.
Use of this option is strongly discouraged in IGWN and may be forcibly disabled in the future. For details of the reasons for this discouragement, and plans to disable its use, please see
https://git.ligo.org/groups/computing/-/epics/30
Note: as of HTCondor 10.7, getenv = True
is silently disabled (by default) for jobs that are submitted as part of a DAGMan workflow.