18 |
|
def __init__(self, name="GLITE"): |
19 |
|
SchedulerGrid.__init__(self,name) |
20 |
|
|
21 |
< |
self.OSBsize = 55000000 |
21 |
> |
self.EDG_retry_count = 0 |
22 |
> |
self.EDG_shallow_retry_count= -1 |
23 |
> |
self.OSBsize = 55*1000*1000 # 55MB |
24 |
|
|
25 |
|
def configure(self,cfg_params): |
26 |
|
SchedulerGrid.configure(self, cfg_params) |
163 |
|
dest= task.jobs[i-1]['dlsDestination'] |
164 |
|
|
165 |
|
req='' |
166 |
< |
req +=task['jobType'] |
166 |
> |
#req +=task['jobType'] |
167 |
> |
####### FEDE FOR BUG 73010 ############ |
168 |
> |
try: |
169 |
> |
#print "task['jobType'] = ", task['jobType'] |
170 |
> |
req +=task['jobType'] |
171 |
> |
except TypeError: |
172 |
> |
msg = "Error: wrong or missing task info. Your created task can not be submitted. Please check your configuration file and create the task again. \n " |
173 |
> |
raise CrabException(msg) |
174 |
> |
####################################### |
175 |
|
|
176 |
|
sched_param='' |
177 |
|
sched_param+='Requirements = ' + req +self.specific_req() + self.se_list(dest) +\ |
180 |
|
sched_param+='MyProxyServer = "' + self.proxyServer + '";\n' |
181 |
|
sched_param+='VirtualOrganisation = "' + self.VO + '";\n' |
182 |
|
sched_param+='RetryCount = '+str(self.EDG_retry_count)+';\n' |
183 |
+ |
sched_param+='DefaultNodeRetryCount = '+str(self.EDG_retry_count)+';\n' |
184 |
|
sched_param+='ShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n' |
185 |
+ |
sched_param+='DefaultNodeShallowRetryCount = '+str(self.EDG_shallow_retry_count)+';\n' |
186 |
|
|
187 |
|
return sched_param |
188 |
|
|
221 |
|
|
222 |
|
txt += 'func_exit() { \n' |
223 |
|
txt += self.wsExitFunc_common() |
212 |
– |
### specific Glite check for OSB |
213 |
– |
txt += ' tar zcvf ${out_files}.tgz ${final_list}\n' |
214 |
– |
txt += ' tmp_size=`ls -gGrta ${out_files}.tgz | awk \'{ print $3 }\'`\n' |
215 |
– |
txt += ' rm ${out_files}.tgz\n' |
216 |
– |
txt += ' size=`expr $tmp_size`\n' |
217 |
– |
txt += ' echo "Total Output dimension: $size"\n' |
218 |
– |
txt += ' limit='+str(self.OSBsize) +' \n' |
219 |
– |
txt += ' echo "WARNING: output files size limit is set to: $limit"\n' |
220 |
– |
txt += ' if [ "$limit" -lt "$size" ]; then\n' |
221 |
– |
txt += ' exceed=1\n' |
222 |
– |
txt += ' job_exit_code=70000\n' |
223 |
– |
txt += ' echo "Output Sanbox too big. Produced output is lost "\n' |
224 |
– |
txt += ' else\n' |
225 |
– |
txt += ' exceed=0\n' |
226 |
– |
txt += ' echo "Total Output dimension $size is fine."\n' |
227 |
– |
txt += ' fi\n' |
228 |
– |
|
229 |
– |
txt += ' echo "JOB_EXIT_STATUS = $job_exit_code"\n' |
230 |
– |
txt += ' echo "JobExitCode=$job_exit_code" >> $RUNTIME_AREA/$repo\n' |
231 |
– |
txt += ' dumpStatus $RUNTIME_AREA/$repo\n' |
232 |
– |
txt += ' if [ $exceed -ne 1 ]; then\n' |
233 |
– |
txt += ' tar zcvf ${out_files}.tgz ${final_list}\n' |
234 |
– |
txt += ' else\n' |
235 |
– |
txt += ' tar zcvf ${out_files}.tgz CMSSW_${NJob}.stdout CMSSW_${NJob}.stderr\n' |
236 |
– |
txt += ' fi\n' |
237 |
– |
txt += ' python $RUNTIME_AREA/fillCrabFjr.py $RUNTIME_AREA/crab_fjr_$NJob.xml --errorcode $job_exit_code \n' |
224 |
|
txt += ' exit $job_exit_code\n' |
225 |
|
|
226 |
|
txt += '}\n' |