ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/SchedulerGlidein.py
(Generate patch)

Comparing COMP/CRAB/python/SchedulerGlidein.py (file contents):
Revision 1.13 by ewv, Fri Jun 6 20:32:01 2008 UTC vs.
Revision 1.19 by belforte, Thu Jun 14 15:53:44 2012 UTC

# Line 1 | Line 1
1 < from SchedulerCondorCommon import SchedulerCondorCommon
2 < import common
1 > """
2 > Glidein specific portions of the interface to the BossLite scheduler
3 > """
4  
5   __revision__ = "$Id$"
6   __version__ = "$Revision$"
7  
8 < class SchedulerGlidein(SchedulerCondorCommon):
9 <  def __init__(self):
9 <    SchedulerCondorCommon.__init__(self,"GLIDEIN")
10 <    return
8 > from SchedulerCondorCommon import SchedulerCondorCommon
9 > import common
10  
11 <  def sched_parameter(self,i,task):
11 > class SchedulerGlidein(SchedulerCondorCommon):
12      """
13 <    Return scheduler-specific parameters
13 >    Glidein specific portions of the interface to the BossLite scheduler
14      """
16    jobParams = SchedulerCondorCommon.sched_parameter(self,i,task)
17
18    ceDest = self.seListToCElist(task.jobs[i-1]['dlsDestination'], onlyOSG=False)
19    ceString = ','.join(ceDest)
20
21    jobParams += '+DESIRED_Gatekeepers = "'+ceString+'"; '
22    jobParams += '+DESIRED_Archs = "INTEL,X86_64"; '
23    jobParams += "Requirements = stringListMember(GLIDEIN_Gatekeeper,DESIRED_Gatekeepers) &&  stringListMember(Arch,DESIRED_Archs); "
24    if (self.EDG_clock_time):
25      jobParams += '+MaxWallTimeMins = '+self.EDG_clock_time+'; '
26    else:
27      jobParams += '+MaxWallTimeMins = 120; '
28
29    common._db.updateTask_({'jobType':jobParams})
30    return jobParams # Not sure I even need to return anything
31
32  def listMatch(self, seList, full):
33    ceDest = SchedulerCondorCommon.listMatch(seList, onlyOSG=False)
34    return ceDest
15  
16 +    def __init__(self):
17 +        SchedulerCondorCommon.__init__(self,"GLIDEIN")
18 +        self.OSBsize = 55*1000*1000 # 55MB
19 +        self.environment_unique_identifier = '$Glidein_MonitorID'
20 +        return
21 +
22 +
23 +    def sched_parameter(self, i, task):
24 +        """
25 +        Return scheduler-specific parameters
26 +        """
27 +        jobParams = SchedulerCondorCommon.sched_parameter(self, i, task)
28 +        seDest = task.jobs[i-1]['dlsDestination']
29 +        ceDest = self.seListToCElist(seDest, onlyOSG=False)
30 +        ceString = ','.join(ceDest)
31 +
32 +        jobParams += '+DESIRED_Gatekeepers = "'+ceString+'"; '
33 +        jobParams += '+DESIRED_Archs = "INTEL,X86_64"; '
34 +        jobParams += "Requirements = stringListMember(GLIDEIN_Gatekeeper,DESIRED_Gatekeepers) &&  stringListMember(Arch,DESIRED_Archs); "
35 +        if (self.EDG_clock_time):
36 +            jobParams += '+MaxWallTimeMins = '+self.EDG_clock_time+'; '
37 +        else:
38 +            jobParams += '+MaxWallTimeMins = 1440; '
39 +
40 +        common._db.updateTask_({'jobType':jobParams})
41 +        return jobParams # Not sure I even need to return anything
42 +
43 +
44 +    def listMatch(self, seList, full, onlyOSG=False):
45 +        """
46 +        Check the compatibility of available resources
47 +        """
48 +        ceDest = SchedulerCondorCommon.listMatch(self, seList, full, onlyOSG=False)
49 +        return ceDest
50 +
51 +
52 +    def envUniqueID(self):
53 +        msg = 'JobID for ML monitoring is created for Glidein scheduler: %s'%id
54 +        common.logger.debug(msg)
55 +        return '$Glidein_MonitorID'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines