1 |
ewv |
1.105 |
"""
|
2 |
|
|
CondorG specific parts of the scheduler
|
3 |
|
|
Non-specific code comes from SchedulerCondorCommon
|
4 |
|
|
"""
|
5 |
|
|
|
6 |
ewv |
1.96 |
from SchedulerCondorCommon import SchedulerCondorCommon
|
7 |
gutsche |
1.1 |
import common
|
8 |
ewv |
1.105 |
|
9 |
|
|
__revision__ = "$Id: SchedulerCondor_g.py,v 1.104 2008/05/13 17:04:29 ewv Exp $"
|
10 |
|
|
__version__ = "$Revision: 1.104 $"
|
11 |
ewv |
1.83 |
|
12 |
ewv |
1.96 |
# All of the content moved to SchedulerCondorCommon.
|
13 |
ewv |
1.83 |
|
14 |
ewv |
1.96 |
class SchedulerCondor_g(SchedulerCondorCommon):
|
15 |
|
|
"""
|
16 |
ewv |
1.105 |
CondorG specific parts of the CondorG scheduler
|
17 |
ewv |
1.96 |
"""
|
18 |
gutsche |
1.1 |
|
19 |
ewv |
1.101 |
|
20 |
ewv |
1.105 |
def __init__(self):
|
21 |
|
|
SchedulerCondorCommon.__init__(self,"CONDOR_G")
|
22 |
|
|
return
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
def sched_parameter(self, i, task):
|
26 |
|
|
"""
|
27 |
|
|
Return scheduler-specific parameters
|
28 |
|
|
"""
|
29 |
|
|
jobParams = SchedulerCondorCommon.sched_parameter(self, i, task)
|
30 |
|
|
|
31 |
|
|
ceDest = self.seListToCElist(task.jobs[i-1]['dlsDestination'])
|
32 |
|
|
|
33 |
|
|
if len(ceDest) == 1:
|
34 |
|
|
jobParams += "globusscheduler = "+ceDest[0]+"; "
|
35 |
|
|
else:
|
36 |
|
|
jobParams += "schedulerList = "+','.join(ceDest)+"; "
|
37 |
|
|
|
38 |
|
|
globusRSL = self.GLOBUS_RSL
|
39 |
|
|
if (self.EDG_clock_time):
|
40 |
|
|
globusRSL += '(maxWalltime='+self.EDG_clock_time+')'
|
41 |
|
|
else:
|
42 |
|
|
globusRSL += '(maxWalltime=120)'
|
43 |
|
|
|
44 |
|
|
if (globusRSL != ''):
|
45 |
|
|
jobParams += 'globusrsl = ' + globusRSL + '; '
|
46 |
ewv |
1.103 |
|
47 |
ewv |
1.105 |
common._db.updateTask_({'jobType':jobParams})
|
48 |
|
|
return jobParams # Not sure I even need to return anything
|