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.7 by belforte, Fri Aug 10 09:17:19 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 124 | Line 126 | class SchedulerRcondor(SchedulerGrid) :
126          Return dictionary with specific parameters, to use with real scheduler
127          is called when scheduler is initialized in Boss, i.e. at each crab command
128          """
129 +        #SB this method is used to pass directory names to Boss Scheduler
130 +        # via params dictionary
131  
128        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
129        tmpDir = os.path.join(common.work_space.shareDir(),'.condor_temp')
132          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
133          taskDir=common.work_space.topDir().split('/')[-2]
134 <        rcondorDir ='%s/.rcondor/%s/mount/' % (os.getenv('HOME'),self.rcondorHost)
135 <        tmpDir = os.path.join(rcondorDir,taskDir)
159 <        tmpDir = os.path.join(tmpDir,'condor_temp')
134 >        shareDir = common.work_space.shareDir()
135 >        #SBtmpDir = common.work_space.tmpDir()
136          
137 <        params = {'tmpDir':tmpDir,
138 <                  'jobDir':jobDir}
137 >        params = {'rcondorHost':self.rcondorHost,
138 >                  'shareDir':shareDir,
139 >                  #SB'tmpDir':tmpDir,
140 >                  'jobDir':jobDir,
141 >                  'taskDir':taskDir}
142  
143          return params
144  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines