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

Comparing COMP/CRAB/python/SchedulerCaf.py (file contents):
Revision 1.14.2.1 by spiga, Tue Nov 10 18:26:55 2009 UTC vs.
Revision 1.21 by belforte, Thu Jan 17 14:48:12 2013 UTC

# Line 16 | Line 16 | class SchedulerCaf(SchedulerLsf) :
16      def __init__(self):
17          SchedulerLsf.__init__(self)
18          Scheduler.__init__(self,"CAF")
19 +        self.OSBsize = 55*1000*1000  # 55 MB
20  
21          return
22  
# Line 26 | Line 27 | class SchedulerCaf(SchedulerLsf) :
27          SchedulerLsf.configure(self, cfg_params)
28          self.queue = cfg_params.get(self.name().upper()+'.queue','cmscaf1nw')
29          self.res = cfg_params.get(self.name().upper()+'.resource','"type==SLC5_64 || type==SLC4_64"')
30 <        self.pool = cfg_params.get('USER.storage_pool','cmscafuser')
30 >        self.group = cfg_params.get(self.name().upper()+'.group', None)
31  
32 < #    def wsSetupEnvironment(self):
33 < #        """
34 < #        Returns part of a job script which does scheduler-specific work.
35 < #        """
36 < #        txt = SchedulerLsf.wsSetupEnvironment(self)
37 < #        txt += '# CAF specific stuff\n'
38 < #        #txt += 'export STAGE_SVCCLASS=cmscaf \n'
39 < #        txt += '\n'
40 < #        return txt
41 <
42 <    def wsCopyOutput(self):
43 <        ### default is the name of the storage pool
44 <        ### where users can copy job outputs  
45 <        txt=self.wsCopyOutput_comm(self.pool)
32 >    def sched_parameter(self,i,task):
33 >        """
34 >        Returns parameter scheduler-specific, to use with BOSS .
35 >        """
36 >        sched_param= ''
37 >
38 >        if (self.queue):
39 >            sched_param += '-q '+self.queue +' '
40 >        if (self.res): sched_param += ' -R '+self.res +' '
41 >        if (self.group): sched_param += ' -G '+str(self.group).upper() +' '
42 >        return sched_param
43 >
44 >    def wsSetupEnvironment(self):
45 >        #Returns part of a job script which does scheduler-specific work.
46 >        txt = SchedulerLsf.wsSetupEnvironment(self)
47 >        txt += '# CAF specific stuff\n'
48 >        txt += 'echo "----- ENV CAF BEFORE sourcing /afs/cern.ch/cms/caf/setup.sh  -----"\n'
49 >        txt += 'echo "CMS_PATH = $CMS_PATH"\n'
50 >        txt += 'echo "STAGE_SVCCLASS = $STAGE_SVCCLASS"\n'
51 >        txt += 'echo "STAGER_TRACE = $STAGER_TRACE"\n'
52 >        txt += 'source /afs/cern.ch/cms/caf/setup.sh \n'
53 >        txt += '\n'
54 >        txt += 'echo "----- ENV CAF AFTER sourcing /afs/cern.ch/cms/caf/setup.sh  -----"\n'
55 >        txt += 'echo "CMS_PATH = $CMS_PATH"\n'
56 >        txt += 'echo "STAGE_SVCCLASS = $STAGE_SVCCLASS"\n'
57 >        txt += 'echo "STAGER_TRACE = $STAGER_TRACE"\n'
58 >        txt += '\n'
59 >        return txt
60 >
61 >    def wsExitFunc(self):
62 >        """
63 >        """
64 >        txt = '\n'
65 >
66 >        txt += '#\n'
67 >        txt += '# EXECUTE THIS FUNCTION BEFORE EXIT \n'
68 >        txt += '#\n\n'
69 >        txt += 'func_exit() { \n'
70 >        txt += self.wsExitFunc_common()
71 >
72 >        txt += '    cp *.${LSB_BATCH_JID}.out CMSSW_${NJob}.stdout \n'
73 >        txt += '    cp *.${LSB_BATCH_JID}.err CMSSW_${NJob}.stderr \n'
74 >        txt += '    exit $job_exit_code\n'
75 >        txt += '}\n'
76          return txt

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines