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.78 by spigafi, Wed Feb 3 14:59:30 2010 UTC vs.
Revision 1.86 by belforte, Thu Jan 17 15:15:03 2013 UTC

# Line 18 | Line 18 | class SchedulerGlite(SchedulerGrid):
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)
# Line 45 | Line 47 | class SchedulerGlite(SchedulerGrid):
47      def rb_configure(self, RB):
48          url ='http://cmsdoc.cern.ch/cms/LCG/crab/config/'
49          from Downloader import Downloader
50 +        import httplib
51          common.logger.debug('Downloading config files for WMS: '+url)
52          ## 25-Jun-2009 SL: patch to use Cream enabled WMS
53          if ( self.cfg_params.get('GRID.use_cream',None) ):
# Line 54 | Line 57 | class SchedulerGlite(SchedulerGrid):
57          configFileName = 'glite_wms_'+str(RB)+'.conf'
58  
59          results = Downloader(url)
60 <        gliteConfig  = results.filePath(configFileName)
60 >        try:
61 >            gliteConfig  = results.filePath(configFileName)
62 >        except httplib.HTTPException, ex:
63 >            raise CrabException( "Problem getting RB config file: %s, reason:"%(configFileName, ex) )
64  
65          if (gliteConfig ):
66              rb_param_file = gliteConfig
# Line 157 | Line 163 | class SchedulerGlite(SchedulerGrid):
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) +\
# Line 166 | Line 180 | class SchedulerGlite(SchedulerGrid):
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  
# Line 205 | Line 221 | class SchedulerGlite(SchedulerGrid):
221  
222          txt += 'func_exit() { \n'
223          txt += self.wsExitFunc_common()
208        ### specific Glite check for OSB
209        txt += '    tar zcvf ${out_files}.tgz  ${final_list}\n'
210        txt += '    tmp_size=`ls -gGrta ${out_files}.tgz | awk \'{ print $3 }\'`\n'
211        txt += '    rm ${out_files}.tgz\n'
212        txt += '    size=`expr $tmp_size`\n'
213        txt += '    echo "Total Output dimension: $size"\n'
214        txt += '    limit='+str(self.OSBsize) +' \n'
215        txt += '    echo "WARNING: output files size limit is set to: $limit"\n'
216        txt += '    if [ "$limit" -lt "$size" ]; then\n'
217        txt += '        exceed=1\n'
218        txt += '        job_exit_code=70000\n'
219        txt += '        echo "Output Sanbox too big. Produced output is lost "\n'
220        txt += '    else\n'
221        txt += '        exceed=0\n'
222        txt += '        echo "Total Output dimension $size is fine."\n'
223        txt += '    fi\n'
224
225        txt += '    echo "JOB_EXIT_STATUS = $job_exit_code"\n'
226        txt += '    echo "JobExitCode=$job_exit_code" >> $RUNTIME_AREA/$repo\n'
227        txt += '    dumpStatus $RUNTIME_AREA/$repo\n'
228        txt += '    if [ $exceed -ne 1 ]; then\n'
229        txt += '        tar zcvf ${out_files}.tgz  ${final_list}\n'
230        txt += '    else\n'
231        txt += '        tar zcvf ${out_files}.tgz CMSSW_${NJob}.stdout CMSSW_${NJob}.stderr\n'
232        txt += '    fi\n'
233        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'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines