Re: [classad-users] How to modify classad after mathing to another classad?


Date: Tue, 15 Jan 2013 17:21:25 -0600
From: Jaime Frey <jfrey@xxxxxxxxxxx>
Subject: Re: [classad-users] How to modify classad after mathing to another classad?
> Dear all:
>      I am using classad in a normal manner. That is, a classad used to represent a machine resource  and another classad used to represent a job.  For example:
> 
> Job ClassAd:
> 
>     [
>         Requirements = ( other.memory >= 4000 )
>     ]
> 
> Machine ClassAd:
> 
>     [
>         memory = 4500
>     ]
> 
> When a math happens, the available memory of the machine drops to 500. Then how can I modify the rest memory in the machine  classad?  I mean, in a nice and elegant way. 
> 
> Many thanks!
> 
> regards
> zhangzhang

I believe the best way to do this is to separate the job ad's desired memory value into its own attribute, like this:
[
  Requirements = ( other.memory >= RequestMemory );
  RequestMemory = 4000
]

Then, once you find a match, you can evaluate "Memory - other.RequestMemory" in the machine ad's context and set the result as the new value for Memory.

Thanks and regards,
Jaime Frey
UW-Madison HTCondor Project

[← Prev in Thread] Current Thread [Next in Thread→]
  • Re: [classad-users] How to modify classad after mathing to another classad?, Jaime Frey <=