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

[HTCondor-users] DAGman -appends VARS, which trips up submit conditionals



A simple example:

If defined FOOBAR
	Error : foobar is defined
Else
	Error : foobar is undefined
Executable = /bin/sleep
Arguments = 1
queue

Using -append:
:!condor_submit -append foobar=123 test.sub
Submitting job(s)
ERROR: on Line 5 of submit file:
Submit:-1:Error "test.sub", Line 5: foobar is undefined   <<======

Using key=value:
:!condor_submit foobar=123 test.sub
Submitting job(s)
ERROR: on Line 3 of submit file:
Submit:-1:Error "test.sub", Line 3: foobar is defined

Changing it to "if $(FOOBAR)" doesn't work either - so it appears that the if statements are evaluated immediately in sequence as the file is being read, like the include statement, and this would seem to suggest that DAGman VARS can't be used to control the evaluation of a submission. This is not documented in section 2.5.5 of the manual, so it caught me off guard.

Does any DAGman SME have any suggestions?

Is there any way to get a macro defined at the beginning of the submit through DAGman so that it can be used with conditional expressions? Or can someone suggest any tricks or alternative strategies to modularize the submit description? I'd hate to have to carve it up into pieces. It's getting late, so I may be missing a piece of the puzzle somwehre.


Michael V. Pelletier
Information Technology
Digital Transformation & Innovation
Integrated Defense Systems
Raytheon Company