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

Re: [Condor-users] Classads and matchmakiing



Hi Dan,

Yep, MATCH_EXP gets me there. I got it to work with the following incantation:

+testType = "$$([TEST_TYPE])"
Requirements = (TEST_TYPE =!= UNDEFINED) && ((MY.NumJobStarts == 0) || ((MY.NumJobStarts > 0) && (MY.MATCH_EXP_testType == TEST_TYPE)))

I've tested this across a couple of restarts and it works, so the MATCH_EXP attribute seems to be relatively long lived (this was on 7.4.4).

Ta for the help,
Mark

On 20/10/2010 17:32, Dan Bradley wrote:
 Hi Mark,

In Condor 7.5.4, which is just about to be released, there is a new feature that allows you to store in the job ad a history of machine attributes for machines the job has run on. This is done by specifying which attributes you want to store, using job_machine_attrs in the submit file and/or SYSTEM_JOB_MACHINE_ATTRS in the configuration file. Then you can specify how much history to keep using job_machine_attrs_history_length and/or SYSTEM_JOB_MACHINE_ATTRS_HISTORY_LENGTH.

In versions of Condor prior to 7.5.4, you might be able to get the effect you want. As a side-effect of $$() expansion, an additional attribute is stored in your job ad named MATCH_EXP_<AttrName>, where AttrName is an attribute in your job ad that uses $$() references. This MATCH_EXP_<AttrName> attribute is set to the value of AttrName with all $$() references expanded against the currently matched machine. The part I'm not so sure about without some testing is the lifespan of that MATCH_EXP attribute. If it lasts through the next successful matchmaking attempt for the job, then it should work for your purposes.

--Dan

On 10/20/10 10:39 AM, Mark Calleja wrote:
Hi,

My question relates to how one can set a job classad to select a subset of machines, when that subset may be different on a rescheduled job to what it was on original job submission. Consider this scenario: I have two groups of machines, which I define to be "RED" or BLUE". In the condor_config.local of those machines I put:

TEST_TYPE = "RED"  # or "BLUE"
STARTD_ATTRS = $(STARTD_ATTRS), TEST_TYPE

I now want to submit a job that initially can pick out either a RED or BLUE machine (but it must be one of these, not one without a TEST_TYPE defined). Furthermore, I want to make sure that if my job was to get preempted from a machine, then it can only be rescheduled to run on machine of the same TEST_TYPE that it started off on. So if it started it on a RED machine, then it can only be re-run on a RED machine, etc.

My (unsuccessful) attempt at a submit script to do this has:

+testType = "$$([TEST_TYPE])"
Requirements = (TEST_TYPE =!= UNDEFINED) && ((MY.testType =?= "") || (MY.testType =?= UNDEFINED) || (MY.testType == TEST_TYPE))

The problem is that this never matches. I was hoping that since the $$() construct only evaluates after a match has been made then either (MY.testType =?= "") or (MY.testType =?= UNDEFINED) would evaluate to true on the initial submission, with (MY.testType == TEST_TYPE) becoming true for a specific TEST_TYPE in any subsequent rescheduled event.

Apparently I'm doing something silly, so would any kind soul like to point out my mistake?

Best regards,
Mark

_______________________________________________
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/
_______________________________________________
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/

--
The Cavendish Laboratory, University of Cambridge,
J J Thomson Avenue, Cambridge, CB3 0HE, UK
Tel. (+44/0) 1223 746627
http://www.escience.cam.ac.uk/~mcal00