Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Condor-users] ClassAd syntax in condor_advertise
- Date: Thu, 06 Dec 2007 09:18:21 -0600
- From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
- Subject: Re: [Condor-users] ClassAd syntax in condor_advertise
Jan Ploski wrote:
Hello,
What is the relationship of the syntax that can be used in ClassAd files
for condor_advertise of 6.8.7 and the native ClassAd language syntax as
specified in the ClassAd Language Reference Manual
(http://www.cs.wisc.edu/condor/classad/refman/)?
Similar, but unfortunately different.
There are currently two versions of the ClassAd language floating about.
The one you mention above is the syntax for the standalone ClassAd
libraries available on our website.
Unfortunately for a bunch of (mostly historical) reasons, the Condor
system does not currently use these ClassAd libraries. It uses an older
implementation that has slightly different syntax. The biggest
difference is the ClassAd syntax inside Condor does not support some
literal value types including sets, time, and nested classads. Also,
although both versions support a very similar set of built-in functions,
some of the functions differ due to these typing differences.
Details on the ClassAd syntax used inside of Condor can be found in the
Condor Manual section 4.1, available online at :
http://www.cs.wisc.edu/condor/manual/v6.9/4_1Condor_s_ClassAd.html
When I try specifying
attributes like foo = [ a=1; b=2 ] or bar = { 1, 2, 3 }, condor_advertise
rejects them, telling me that it "couldn't parse ClassAd".
Right, because the ClassAd implementation inside of Condor does not
support sets. It does, however, support "strings that contain a list",
so you can do stuff like
bar = "1, 2, 3, 7, 6.4, 32, 0"
and then use all sorts of handy built-in functions like the below; see
the Manual for more details. The stringList family of functions inside
of Condor is kind of a substitute for the more formal set functions
found in the later versions of ClassAds.
Hope this helps,
Todd.
Integer stringListSize(String list [ , String delimiter ])
Returns the number of elements in the string list, as delimited by
the optional delimiter string. Returns ERROR if either argument is not a
string.
Integer stringListSum(String list [ , String delimiter ])
OR Real stringListSum(String list [ , String delimiter ])
Sums and returns the sum of all items in the string list, as
delimited by the optional delimiter string. If all items in the list are
integers, the return value is also an integer. If any item in the list
is a real value (noninteger), the return value is a real. If any item
does not represent an integer or real value, the return value is ERROR.
Real stringListAve(String list [ , String delimiter ])
Sums and returns the real-valued average of all items in the string
list, as delimited by the optional delimiter string. If any item does
not represent an integer or real value, the return value is ERROR. A
list with 0 items (the empty list) returns the value 0.0.
Integer stringListMin(String list [ , String delimiter ])
OR Real stringListMin(String list [ , String delimiter ])
Finds and returns the minimum value from all items in the string
list, as delimited by the optional delimiter string. If all items in the
list are integers, the return value is also an integer. If any item in
the list is a real value (noninteger), the return value is a real. If
any item does not represent an integer or real value, the return value
is ERROR. A list with 0 items (the empty list) returns the value UNDEFINED.
Integer stringListMax(String list [ , String delimiter ])
OR Real stringListMax(String list [ , String delimiter ])
Finds and returns the maximum value from all items in the string
list, as delimited by the optional delimiter string. If all items in the
list are integers, the return value is also an integer. If any item in
the list is a real value (noninteger), the return value is a real. If
any item does not represent an integer or real value, the return value
is ERROR. A list with 0 items (the empty list) returns the value UNDEFINED.
Boolean stringListMember(String x, String list [ , String delimiter ])
Returns TRUE if item x is in the string list, as delimited by the
optional delimiter string. Returns FALSE if item x is not in the string
list. Comparison is done with strcmp(). The return value is ERROR, if
any of the arguments are not strings.
Boolean stringListIMember(String x, String list [ , String delimiter ])
Same as stringListMember(), but comparison is done with stricmp(),
so letter case is not relevant.
Boolean stringListRegexpMember(String pattern, String list [ , String
delimiter ] [ , String options ])
Returns TRUE if any of the strings within the list is a regular
expression as described by pattern. Returns FALSE otherwise. If any
argument is not a string, or if pattern does not describe a valid
regular expression, returns ERROR. To include the fourth (optional)
argument options, a third argument of delimiter is required. A default
value for a delimiter is " ,".
Regards,
Jan Ploski
_______________________________________________
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/
--
Todd Tannenbaum University of Wisconsin-Madison
Condor Project Research Department of Computer Sciences
tannenba@xxxxxxxxxxx 1210 W. Dayton St. Rm #4257
Phone: (608) 263-7132 Madison, WI 53706-1685