Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] does dagman support the trigger condition ?
- Date: Thu, 10 Jul 2008 11:37:17 -0500 (CDT)
- From: "R. Kent Wenger" <wenger@xxxxxxxxxxx>
- Subject: Re: [Condor-users] does dagman support the trigger condition ?
On Thu, 10 Jul 2008, zhang SunMoonStar wrote:
thanks very much! i found that the source of dagman was wriiten by
you.
Well, a number of people have worked on DAGMan.
the first question i asked is that if the dag graph supports the
true-false trigger. e.g: if the parent node A returns 0(true), then run
the child node B,else if the return value is 1(false),then run the
child C,not B.
does dagman support the above situation?
Ah, I misunderstood what you meant by a trigger. DAGMan does not
*directly* support what you want to do, but you can implement this
behavior by using POST scripts. The way DAGMan works is that if a node
returns a non-zero exit value, that node is considered failed and no
children of that node will be run. But a POST script can alter the return
value of a node from what the actual node job returns.
So what you want to do is this: your POST script should change the submit
file of the next node according to the return value from the current
node's job. You can pass the job's exit code to the POST script using the
$RETURN macro as an argument to the POST script. Then the POST script
should return an exit value of 0 so the DAG continues.
So you want something like this:
JOB A A.submit
SCRIPT POST A change_node_B $RETURN
JOB B B.submit
PARENT A CHILD B
Probably the simplest thing is to have two versions of B.submit, one for
an exit code of 0, and one with an exit code of 1. There are a couple of
caveats here:
* B.submit must exist at the time the DAG is submitted (but it's okay to
change it during the DAG execution).
* But -- the changed version of B.submit must have the same log file
as the original version.
Hopefully that all makes sense.
Kent Wenger
Condor Team