Re: [classad-users] Ranks and Requirements


Date: Wed, 21 Jul 2004 13:05:57 -0500 (CDT)
From: Nicholas Coleman <ncoleman@xxxxxxxxxxx>
Subject: Re: [classad-users] Ranks and Requirements
Question 1: match returns null if there is no Requirements or Rank
expression.

Question 2:

Once again this is a case of Condor using old ClassAds and the java
ClassAd library (as well as the C++ library) using new ClassAds.

In old ClassAds (as described in the Condor manual) a boolean value can be
coerced into an integer value (1 for true, 0 for false if I'm not
mistaken).

In new ClassAds (as in the java ClassAd library) typing is stricter so
boolean values can not be coerced into integer values.  However the below
Rank expression can be rewritten using the conditional operator as
follows:

      Rank          = (Friend ? 1 : 0) + (ResearchGroup ? 1 : 0) *10


On Wed, 21 Jul 2004, Kaizar Amin wrote:

> Hi,
>
> As per my understanding, the match function in ClassAd.java
> "public static int[] match(Expr expr1, Expr expr2)"
> seems to work on the following principles:
>
> 1. There MUST exist a REQUIREMENT and RANK attribute in both classads
>   - What happens when there is no requirement attribute, does it default
> to true or does the match fail
>   - What happens when there is no RANK attribute
>
> 2. So far, my assumption is that Requirement attribute is some
> combination of Boolean expressions and Rank is some integer value.
>   - However, in the condor manual I saw the following example:
>
>      Friend        = Owner == "tannenba" || Owner == "wright"
>      ResearchGroup = Owner == "jbasney" || Owner == "raman"
>      Trusted       = Owner != "rival" && Owner != "riffraff"
>      Requirements  = Trusted && ( ResearchGroup || LoadAvg < 0.3 &&
>                           KeyboardIdle > 15*60 )
>      Rank          = Friend + ResearchGroup*10
>
> In this case "Friend" is a boolean attribute, how is it evaluated into
> an integer value.
>
>
> Thanks for your help.
> Kaizar
> Condor Classads Info:
> http://www.cs.wisc.edu/condor/classad/
>

- Nick

Condor Classads Info:
http://www.cs.wisc.edu/condor/classad/



[← Prev in Thread] Current Thread [Next in Thread→]