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

Re: [Condor-users] FW: Can I set a variable in a dagman file for all jobs?



That's great - thanks!
-Ian





On 14/04/2011 16:22, "R. Kent Wenger" <wenger@xxxxxxxxxxx> wrote:

>On Thu, 14 Apr 2011, Ian Cottam wrote:
>
>> Query from a colleague below.
>> thanks
>> -Ian
>>
>> On 14/04/2011 15:34, "Mike Croucher" <Michael.Croucher@xxxxxxxxxxxxxxxx>
>> wrote:
>>
>>> I currently have a dagman file that includes the following
>>>
>>> JOB   1   submit1.txt
>>> JOB   2   submit2.txt
>>> JOB   3   submit3.txt
>>> JOB   4   submit4.txt
>>> JOB   5   submit5.txt
>>> PARENT 1 CHILD 2
>>> PARENT 2 CHILD 3
>>> PARENT 3 CHILD 4
>>> PARENT 4 CHILD 5
>>>
>>> I would like to pass a variable to all 5 jobs.  At the moment, I do it
>>> like this.  The variable is the same for all 5 jobs i.e.
>>>
>>> VARS  1   numhid="200"
>>> VARS  2   numhid="200"
>>> VARS  3   numhid="200"
>>> VARS  4   numhid="200"
>>> VARS  5   numhid="200"
>>>
>>> Is there a cleaner way of doing this?  A one-liner maybe?
>
>At this time, no.  We've thought about allowing wildcards in the node
>name 
>for a VARS declaration, but it's not implemented at this point.
>
>>> Also, is there a variable that is unique to the controlling dag and
>>>does
>>> not vary from job to job?  I'd like to pass this to all of the jobs if
>>> possible.
>
>The classad of each node job contains the attribute DAGManJobId.  So in
>your submit file for a node job, you can do something like this:
>
>   arguments = ... $$(DAGManJobId) ...
>
>Does that do what you want?  Note that you can't pass DAGManJobId to PRE
>and POST scripts.  Also, $$(DAGManJobId) won't work for scheduler
>universe 
>jobs.
>
>Kent Wenger
>Condor Team
>_______________________________________________
>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/
>