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

Re: [Condor-users] Startd injecting environment variables for starting jobs?

On 12/09/2010 10:50 AM, Carsten Aulbert wrote:

in the still ongoing effort in getting GPGPUs into Condor (once I have it I'll
post some description for discussion), I now face the problem, that I would
like to let the job know which interface id it is allowed to use (among
others). I've used START_ATTR to be able to select certain card types vis
requirements in the submit file, however, I have failed so far to see any way
to let the job know some more information, e.g. all I want to inject is
something like


to indicate that this job may (only) use this GPU device...

Please note, I'm not talking about getenv and environment = in the submit
file, but something I can add to the startd/execute node's configuration.

I've tried "STARTD_JOB_EXPRS", but somehow fail to understand how a job can
access the variables given there.

Anyone with a pointer?



STARTD_JOB_EXPRS takes attributes from the job and advertises them on the slot where the job is running. Sounds like the opposite direction.

Any particular reason you're not talking about getenv/environment associated with the job?

You should be able to (not verified) use the Prepare Hook to inject goodness into the job's environment.


Standard input given to the hook
    A copy of the job ClassAd.

Expected standard output from the hook
A set of attributes to insert or update into the job ad. For example, changing the Cmd attribute to a quoted string changes the executable to be run.

You could try a script that reads the $_CONDOR_MACHINE_AD (it's there, right?) grabs the Env attribute and does some concatenation.

Let me know how it goes. I've been meaning to try this out myself.