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

Re: [HTCondor-users] condor_submit and default values



On 6/11/2013 4:28 AM, Joan J. Piles wrote:
Hello all,

We are trying to do a seemingly easy thing, but it has become
surprisingly difficult.

We want our users to be able to add an extra classad to their jobs
(let's say it's a "tag"), and for their convenience we want this tag to
be specified either through an environment variable or directly in the
submit file, but with the submit file taking precedence. What we have
tried (and did *NOT* work):

* Using a condor_submit macro in SUBMIT_EXPRS:
     Tag = $(DOLLAR)ENV(TAG)
     SUBMIT_EXPRS = $(SUBMIT_EXPRS) Tag


No need for a wrapper script.
You were close with the above attempt.

In your condor_config file put

   # Note the use of double quotes below!
   Tag = "$ENV(TAG)"
   SUBMIT_EXPRS = $(SUBMIT_EXPRS) Tag

And now when your submit a job, by default you will get a job attribute "Tag" with the value of environment variable TAG, but can override in your submit file by doing:

   +Tag = "override"
   queue


regards,
Todd