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

Comparing COMP/CRAB/python/SchedulerGlite.py (file contents):
Revision 1.11 by spiga, Sat Jan 20 13:47:46 2007 UTC vs.
Revision 1.13 by slacapra, Wed Feb 28 14:10:33 2007 UTC

# Line 47 | Line 47 | class SchedulerGlite(SchedulerEdg):
47    
48    
49          if self.EDG_requirements:
50 <            if (req == ' '):
51 <                req = req + self.EDG_requirements
52 <            else:
53 <                req = req +  ' && ' + self.EDG_requirements
50 >            if (not req == ' '): req = req +  ' && '
51 >            req = req + self.EDG_requirements
52 >
53          if self.EDG_ce_white_list:
54              ce_white_list = string.split(self.EDG_ce_white_list,',')
55 <            for i in range(len(ce_white_list)):
56 <                if i == 0:
57 <                    if (req == ' '):
58 <                        req = req + '((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
59 <                    else:
61 <                        req = req +  ' && ((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
62 <                    pass
63 <                else:
64 <                    req = req +  ' || (RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
65 <            req = req + ')'
55 >            tmpCe=[]
56 >            concString = '&&'
57 >            for ce in ce_white_list:
58 >                tmpCe.append('RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId)')
59 >            if len(tmpCe): req = req + " && (" + concString.join(tmpCe) + ") "
60          
61          if self.EDG_ce_black_list:
62              ce_black_list = string.split(self.EDG_ce_black_list,',')
63 +            tmpCe=[]
64 +            concString = '&&'
65              for ce in ce_black_list:
66 <                if (req == ' '):
67 <                    req = req + '(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
72 <                else:
73 <                    req = req +  ' && (!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
74 <                pass
75 <        
66 >                tmpCe.append('(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))')
67 >            if len(tmpCe): req = req + " && (" + concString.join(tmpCe) + ") "
68  
69          if self.EDG_clock_time:
70 <            if (req == ' '):
71 <                req = req + 'other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time
80 <            else:
81 <                req = req + ' && other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time
70 >            if (not req == ' '): req = req + ' && '
71 >            req = req + 'other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time
72  
73          if self.EDG_cpu_time:
74 <            if (req == ' '):
75 <                req = req + ' other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time
86 <            else:
87 <                req = req + ' && other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time
74 >            if (not req == ' '): req = req + ' && '
75 >            req = req + ' other.GlueCEPolicyMaxCPUTime>='+self.EDG_cpu_time
76                  
77          for i in range(len(first)): # Add loop DS
78              self.param='sched_param_'+str(i)+'.clad'
# Line 94 | Line 82 | class SchedulerGlite(SchedulerEdg):
82              reqSites=''
83              reqtmp=[]  
84              concString = '||'
85 +
86 +            #############
87 +            # MC Changed matching syntax to avoid gang matching
88 +            #############
89              for arg in itr4:
98                #############
99                # MC Changed matching syntax to avoid gang matching
100                #############
90                  reqtmp.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ')
91 <            if len(reqtmp): reqSites = reqSites + " && (" + concString.join(reqtmp)  
91 >
92 >            if len(reqtmp): reqSites = reqSites + " && (" + concString.join(reqtmp) + ") "
93 >
94              # requirement added to skip gliteCE
95 <            reqSites = reqSites + '&& (!RegExp("*blah*", other.GlueCEUniqueId)));\n'
95 >            reqSites = reqSites + '&& (!RegExp("blah", other.GlueCEUniqueId));\n'
96 >
97              param_file.write('Requirements = ' + req + reqSites )
98    
99              if (self.rb_param_file != ''):

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines