Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] condor_submit feature request
- Date: Wed, 06 Aug 2008 09:34:13 -0500
- From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
- Subject: Re: [Condor-users] condor_submit feature request
Ryan Lewis wrote:
I would like to see support for the basic math operations ($(Process)
+12)*3/400
That would solve your problem.
They would indeed. And that functionality is already there (for the
most part), and is much more powerful than just basic math ops.
So Steffen said he needed to pass an argument to his program that is
based off of $(Process). Take note that $(Process) isn't the only
macro available. From the condor_submit man page, take note of the
special macro form
$$([ ... some ClassAd expression ... ])
So you can essentially not only use basic math operations, but you can
also use any ClassAd expression, ClassAd functions (which include all
kinds of string manipulations), and attribute references from either the
job or target ads. Wh00t! Yes, I know the syntax is a little crazy,
but it is really powerful/flexible.
For instance, from Ryan's example above you could do:
arguments = $$([ ($(Process)+12)*3/400 ])
So Steffen, to do what you want, you could have a submit file like so:
START_AT = 50
RANDOM_SEED = $$([ $(Process) + $(START_AT) ])
notification = never
universe = vanilla
executable = foo.exe
arguments = -seed $(RANDOM_SEED)
output = test.$(Process).out
queue 500
Just edit the "START_AT" macro. Does the above satisfy your request?
BTW, in the above I say the functionality is there "for the most part".
My hesitation is because the $$([ ]) mechanism currently does not work
for LOCAL or SCHEDULER universe jobs. I will fix that shortcoming in
the next developer release.
regards,
Todd
--
Todd Tannenbaum University of Wisconsin-Madison
Condor Project Research Department of Computer Sciences
tannenba@xxxxxxxxxxx 1210 W. Dayton St. Rm #4257