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

Comparing COMP/CRAB/python/SchedulerRcondor.py (file contents):
Revision 1.6 by belforte, Tue Aug 7 23:05:18 2012 UTC vs.
Revision 1.8 by belforte, Fri Aug 10 14:57:24 2012 UTC

# Line 31 | Line 31 | class SchedulerRcondor(SchedulerGrid) :
31      def __init__(self):
32          SchedulerGrid.__init__(self,"RCONDOR")
33          self.rcondorHost   = os.getenv('RCONDOR_HOST')
34 +        if self.rcondorHost == None:
35 +            raise CrabException('FATAL ERROR: env.var RCONDOR_HOST not defined')
36          self.datasetPath   = None
37          self.selectNoInput = None
38          self.OSBsize = 50*1000*1000 # 50 MB
# Line 49 | Line 51 | class SchedulerRcondor(SchedulerGrid) :
51          self.proxyValid=0
52          self.dontCheckProxy=int(cfg_params.get("GRID.dont_check_proxy",0))
53          self.space_token = cfg_params.get("USER.space_token",None)
54 <        try:
53 <            self.proxyServer = Downloader("http://cmsdoc.cern.ch/cms/LCG/crab/config/").config("myproxy_server.conf")
54 <            self.proxyServer = self.proxyServer.strip()
55 <            if self.proxyServer is None:
56 <                raise CrabException("myproxy_server.conf retrieved but empty")
57 <        except Exception, e:
58 <            common.logger.info("Problem setting myproxy server endpoint: using myproxy.cern.ch")
59 <            common.logger.debug(e)
60 <            self.proxyServer= 'myproxy.cern.ch'
54 >        self.proxyServer= 'myproxy.cern.ch'
55          self.group = cfg_params.get("GRID.group", None)
56          self.role = cfg_params.get("GRID.role", None)
57          self.VO = cfg_params.get('GRID.virtual_organization','cms')
# Line 124 | Line 118 | class SchedulerRcondor(SchedulerGrid) :
118          Return dictionary with specific parameters, to use with real scheduler
119          is called when scheduler is initialized in Boss, i.e. at each crab command
120          """
121 +        #SB this method is used to pass directory names to Boss Scheduler
122 +        # via params dictionary
123  
128        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
129        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
124          jobDir = common.work_space.jobDir()
131
132        taskDir=common.work_space.topDir().split('/')[-2]
133        rcondorDir ='%s/.rcondor/%s/mount/' % (os.getenv('HOME'),self.rcondorHost)
134
135        if (self.EDG_clock_time):
136            jobParams += '+MaxWallTimeMins = '+self.EDG_clock_time+'; '
137        else:
138            jobParams += '+MaxWallTimeMins = %d; ' % (60*24)
139
140        common._db.updateTask_({'jobType':jobParams})
141
142
143        return jobParams
144
145
146    def realSchedParams(self, cfg_params):
147        """
148        Return dictionary with specific parameters, to use with real scheduler
149        is called when scheduler is initialized in Boss, i.e. at each crab command
150        """
151
152        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
153        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
154        jobDir = common.work_space.jobDir()
155
125          taskDir=common.work_space.topDir().split('/')[-2]
126 <        rcondorDir ='%s/.rcondor/%s/mount/' % (os.getenv('HOME'),self.rcondorHost)
127 <        tmpDir = os.path.join(rcondorDir,taskDir)
159 <        tmpDir = os.path.join(tmpDir,'condor_temp')
126 >        shareDir = common.work_space.shareDir()
127 >        #SBtmpDir = common.work_space.tmpDir()
128          
129 <        params = {'tmpDir':tmpDir,
130 <                  'jobDir':jobDir}
129 >        params = {'rcondorHost':self.rcondorHost,
130 >                  'shareDir':shareDir,
131 >                  #SB'tmpDir':tmpDir,
132 >                  'jobDir':jobDir,
133 >                  'taskDir':taskDir}
134  
135          return params
136  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines