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.4 by fanzago, Wed Oct 11 15:45:53 2006 UTC vs.
Revision 1.12 by slacapra, Mon Feb 26 12:02:25 2007 UTC

# Line 1 | Line 1
1 #from Scheduler import Scheduler
1   from SchedulerEdg import SchedulerEdg
2   from crab_logger import Logger
3   from crab_exceptions import *
4   from crab_util import *
6 #from EdgConfig import *
5   from GliteConfig import *
6   import common
7  
# Line 21 | Line 19 | class SchedulerGlite(SchedulerEdg):
19          self.glite_config = gliteConfig.config()
20  
21          if (self.glite_config != ''):
22 <            self.rb_param_file = 'WMSconfig = '+self.glite_config+';'
22 >            self.rb_param_file = 'WMSconfig = '+self.glite_config+';\n'
23              #print "rb_param_file = ", self.rb_param_file
24          return self.rb_param_file
25  
# Line 46 | Line 44 | class SchedulerGlite(SchedulerEdg):
44    
45          req = ''
46          req = req + jbt.getRequirements()
47 <    
47 >  
48 >  
49          if self.EDG_requirements:
50              if (req == ' '):
51                  req = req + self.EDG_requirements
# Line 57 | Line 56 | class SchedulerGlite(SchedulerEdg):
56              for i in range(len(ce_white_list)):
57                  if i == 0:
58                      if (req == ' '):
59 <                        req = req + '((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
59 >                        req = req + '((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
60                      else:
61 <                        req = req +  ' && ((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
61 >                        req = req +  ' && ((RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
62                      pass
63                  else:
64 <                    req = req +  ' || (RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))'
64 >                    req = req +  ' || (RegExp("' + string.strip(ce_white_list[i]) + '", other.GlueCEUniqueId))'
65              req = req + ')'
66          
67          if self.EDG_ce_black_list:
68              ce_black_list = string.split(self.EDG_ce_black_list,',')
69              for ce in ce_black_list:
70                  if (req == ' '):
71 <                    req = req + '(!RegExp("' + ce + '", other.GlueCEUniqueId))'
71 >                    req = req + '(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
72                  else:
73 <                    req = req +  ' && (!RegExp("' + ce + '", other.GlueCEUniqueId))'
73 >                    req = req +  ' && (!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))'
74                  pass
75 +        
76 +
77          if self.EDG_clock_time:
78              if (req == ' '):
79                  req = req + 'other.GlueCEPolicyMaxWallClockTime>='+self.EDG_clock_time
# Line 90 | Line 91 | class SchedulerGlite(SchedulerEdg):
91              param_file = open(common.work_space.shareDir()+'/'+self.param, 'w')
92  
93              itr4=self.findSites_(first[i])
94 <            req1=[]  
95 <            j = 0
94 >            reqSites=''
95 >            reqtmp=[]  
96              concString = '||'
97              for arg in itr4:
98                  #############
99                  # MC Changed matching syntax to avoid gang matching
100                  #############
101 <                req1.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ')
102 <            if len(req1): req = req + " && (" + concString.join(req1) + ')'
103 <            req = req + ';\n'
104 <            param_file.write('Requirements = ' + req )
101 >                reqtmp.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ')
102 >            if len(reqtmp): reqSites = reqSites + " && (" + concString.join(reqtmp)  
103 >            # requirement added to skip gliteCE
104 >            reqSites = reqSites + '&& (!RegExp("blah", other.GlueCEUniqueId)));\n'
105 >            param_file.write('Requirements = ' + req + reqSites )
106    
105 #            if (self.edg_config and self.edg_config_vo != ''):
106 #               param_file.write('RBconfig = "'+self.edg_config+'";\n')  
107 #                param_file.write('RBconfigVO = "'+self.edg_config_vo+'";')
108
107              if (self.rb_param_file != ''):
108                  param_file.write(self.rb_param_file)  
109  
110 +            if len(self.EDG_addJdlParam):
111 +                for p in self.EDG_addJdlParam:
112 +                    param_file.write(p)
113  
114              param_file.close()  
115  
# Line 245 | Line 246 | class SchedulerGlite(SchedulerEdg):
246          retrieve the logging info from logging and bookkeeping and return it
247          """
248          self.checkProxy()
249 <        cmd = 'glite-job-logging-info -v 2 ' + id
249 >        cmd = 'glite-job-logging-info -v 3 ' + id
250          cmd_out = runCommand(cmd)
251          return cmd_out
252  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines