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

Re: [HTCondor-users] DAG macros



On Thu, May 02, 2013 at 09:23:28AM +0100, Brian Candler wrote:
> The following example comes from
> http://research.cs.wisc.edu/htcondor/manual/v7.8/2_10DAGMan_Applications.html
> 
> "The example uses a single submit description file in the DAG input file,
> and uses the VARS entry to name output files.
> 
> The relevant portion of the DAG input file appears as
> 
>     JOB A theonefile.sub
>     JOB B theonefile.sub
>     JOB C theonefile.sub
> 
>     VARS A outfilename="A"
>     VARS B outfilename="B"
>     VARS C outfilename="C"
> 
> The submit description file appears as
> 
>     # submit description file called:  theonefile.sub
>     executable   = progX
>     universe     = standard
>     output       = $(outfilename)
>     error        = error.$(outfilename)
>     log          = progX.log
>     queue"
> 
> 
> However, experimentally it seems that you can name the output/error settings
> directly in the DAG VARs.  e.g.
> 
>     JOB A theonefile.sub
>     JOB B theonefile.sub
>     JOB C theonefile.sub
> 
>     VARS A output="A" error="error.A"
>     VARS B output="B" error="error.B"
>     VARS C output="C" error="error.C"
> 
> with a simpler submit file:
> 
>     # submit description file called:  theonefile.sub
>     executable   = progX
>     universe     = standard
>     log          = progX.log
>     queue
> 
> It looks like "submit description file commands" and "DAG macros" are in
> fact the same thing, and sit in the same namespace.
> 
> Is this behaviour dependable? Is it documented anywhere?

Brian:

It is as dependable as the -append argument of condor_submit.
For job A above, condor_dagman turns the above into

condor_submit theonefile.sub -a "output = A" -a "error = error.A"

when it submits the job.  I think you can rely on this feature for the
forseeable future.

Nathan Panike

> 
> The reason for the question: I want to avoid having two names for the same
> thing, such as output = $(outputfile). So I had originally tried naming 
> DAG macros the same as the submit file commands I was substituting into, e.g.
> 
>     VARS A output="tmp.txt"
>     ...
>     output = $(output)
> 
> but this broke badly.
> 
> Thanks,
> 
> Brian Candler.