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 |
52 |
< |
else: |
52 |
< |
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("' + ce_white_list[i] + '", other.GlueCEUniqueId))' |
59 |
< |
else: |
60 |
< |
req = req + ' && ((RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))' |
61 |
< |
pass |
62 |
< |
else: |
63 |
< |
req = req + ' || (RegExp("' + ce_white_list[i] + '", other.GlueCEUniqueId))' |
64 |
< |
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("' + ce + '", other.GlueCEUniqueId))' |
68 |
< |
else: |
72 |
< |
req = req + ' && (!RegExp("' + ce + '", other.GlueCEUniqueId))' |
73 |
< |
pass |
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 |
77 |
< |
else: |
78 |
< |
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 |
83 |
< |
else: |
84 |
< |
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' |
81 |
|
itr4=self.findSites_(first[i]) |
82 |
|
reqSites='' |
83 |
|
reqtmp=[] |
93 |
– |
j = 0 |
84 |
|
concString = '||' |
85 |
+ |
|
86 |
+ |
############# |
87 |
+ |
# MC Changed matching syntax to avoid gang matching |
88 |
+ |
############# |
89 |
|
for arg in itr4: |
96 |
– |
############# |
97 |
– |
# MC Changed matching syntax to avoid gang matching |
98 |
– |
############# |
90 |
|
reqtmp.append(' Member("'+arg+'" , other.GlueCESEBindGroupSEUniqueID) ') |
91 |
< |
if len(reqtmp): reqSites = reqSites + " && (" + concString.join(reqtmp) + ')' |
92 |
< |
reqSites = reqSites + ';\n' |
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' |
96 |
> |
|
97 |
|
param_file.write('Requirements = ' + req + reqSites ) |
98 |
|
|
99 |
|
if (self.rb_param_file != ''): |
161 |
|
|
162 |
|
txt += '\n\n' |
163 |
|
|
164 |
< |
if int(self.copy_data) == 1: |
165 |
< |
if self.SE: |
166 |
< |
txt += 'export SE='+self.SE+'\n' |
167 |
< |
txt += 'echo "SE = $SE"\n' |
168 |
< |
if self.SE_PATH: |
169 |
< |
if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/' |
170 |
< |
txt += 'export SE_PATH='+self.SE_PATH+'\n' |
171 |
< |
txt += 'echo "SE_PATH = $SE_PATH"\n' |
164 |
> |
#if int(self.copy_data) == 1: |
165 |
> |
# if self.SE: |
166 |
> |
# txt += 'export SE='+self.SE+'\n' |
167 |
> |
# txt += 'echo "SE = $SE"\n' |
168 |
> |
# if self.SE_PATH: |
169 |
> |
# if ( self.SE_PATH[-1] != '/' ) : self.SE_PATH = self.SE_PATH + '/' |
170 |
> |
# txt += 'export SE_PATH='+self.SE_PATH+'\n' |
171 |
> |
# txt += 'echo "SE_PATH = $SE_PATH"\n' |
172 |
|
|
173 |
|
txt += 'export VO='+self.VO+'\n' |
174 |
|
### some line for LFC catalog setting |
238 |
|
retrieve the logging info from logging and bookkeeping and return it |
239 |
|
""" |
240 |
|
self.checkProxy() |
241 |
< |
cmd = 'glite-job-logging-info -v 2 ' + id |
241 |
> |
cmd = 'glite-job-logging-info -v 3 ' + id |
242 |
|
cmd_out = runCommand(cmd) |
243 |
|
return cmd_out |
244 |
|
|
249 |
|
return cmd_out |
250 |
|
|
251 |
|
def findSites_(self, n): |
252 |
+ |
itr4 = [] |
253 |
|
sites = common.jobDB.destination(n) |
254 |
|
if len(sites)>0 and sites[0]=="": |
255 |
< |
return [] |
256 |
< |
return sites |
255 |
> |
return itr4 |
256 |
> |
if sites != [""]: |
257 |
> |
##Addedd Daniele |
258 |
> |
replicas = self.blackWhiteListParser.checkBlackList(sites,n) |
259 |
> |
if len(replicas)!=0: |
260 |
> |
replicas = self.blackWhiteListParser.checkWhiteList(replicas,n) |
261 |
> |
|
262 |
> |
if len(replicas)==0: |
263 |
> |
msg = 'No sites remaining that host any part of the requested data! Exiting... ' |
264 |
> |
raise CrabException(msg) |
265 |
> |
itr4 = replicas |
266 |
> |
##### |
267 |
> |
return itr4 |
268 |
> |
|
269 |
> |
def submitTout(self, list): |
270 |
> |
return 120 |
271 |
> |
|