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

Comparing COMP/CRAB/python/SchedulerEdg.py (file contents):
Revision 1.9 by spiga, Wed Aug 31 11:39:46 2005 UTC vs.
Revision 1.10 by fanzago, Wed Aug 31 16:06:40 2005 UTC

# Line 21 | Line 21 | class SchedulerEdg(Scheduler):
21  
22      def configure(self, cfg_params):
23  
24 <        try: self.edg_ui_cfg = cfg_params["EDG.rb_config"]
25 <        except KeyError: self.edg_ui_cfg = ''
26 <
27 <        try:
28 <            self.edg_config = cfg_params["EDG.config"]
29 <            if not os.path.isfile(self.edg_config):
30 <                raise CrabException("File EDG.config "+self.edg_config+" does not exist")
24 >        try: self.edg_config = cfg_params["EDG.config"]
25          except KeyError: self.edg_config = ''
26  
27 <        try:
34 <            self.edg_config_vo = cfg_params["EDG.config_vo"]
35 <            if not os.path.isfile(self.edg_config_vo):
36 <                raise CrabException("File EDG.config_vo "+self.edg_config_vo+" does not exist")
27 >        try: self.edg_config_vo = cfg_params["EDG.config_vo"]
28          except KeyError: self.edg_config_vo = ''
29  
30          try: self.LCG_version = cfg_params["EDG.lcg_version"]
# Line 66 | Line 57 | class SchedulerEdg(Scheduler):
57          self.checkProxy_()
58          return
59      
60 +
61 +    def sched_parameter(self):
62 +        """
63 +        Returns file with scheduler-specific parameters
64 +        """
65 +      
66 +        if (self.edg_config and self.edg_config_vo != ''):
67 +            self.param='sched_param.clad'
68 +            param_file = open(common.work_space.shareDir()+'/'+self.param, 'w')
69 +            param_file.write('RBconfig = "'+self.edg_config+'";\n')  
70 +            param_file.write('RBconfigVO = "'+self.edg_config_vo+'";')
71 +            param_file.close()  
72 +            return 1
73 +        else:
74 +            return 0
75      def wsSetupEnvironment(self):
76          """
77          Returns part of a job script which does scheduler-specific work.
# Line 97 | Line 103 | class SchedulerEdg(Scheduler):
103          Check the compatibility of available resources
104          """
105          jdl = common.job_list[nj].jdlFilename()
100        #print ' jdl ',nj, jdl
106          edg_ui_cfg_opt = ''
107          if self.edg_config:
108            edg_ui_cfg_opt = ' -c ' + self.edg_config + ' '
# Line 121 | Line 126 | class SchedulerEdg(Scheduler):
126          Match=0
127          for line in out:
128              line = line.strip()
124            #print line
129              if reComment.match( line ):
130                  next = 0
131                  continue
# Line 198 | Line 202 | class SchedulerEdg(Scheduler):
202  
203      def getExitStatus(self, id):
204          return self.getStatusAttribute_(id, 'exit_code')
205 +
206      def queryStatus(self, id):
207          return self.getStatusAttribute_(id, 'status')
208 +
209      def queryDest(self, id):  
210          return self.getStatusAttribute_(id, 'destination')
211  
# Line 275 | Line 281 | class SchedulerEdg(Scheduler):
281              raise CrabException(msg)
282          return
283      
284 <    def createJDL(self, nj):
284 >    def createSchScript(self, nj):
285          """
286          Create a JDL-file for EDG.
287          """
288  
289          job = common.job_list[nj]
290          jbt = job.type()
285 #        jbt.loadJobInfo()
291          inp_sandbox = jbt.inputSandbox(nj)
292          out_sandbox = jbt.outputSandbox(nj)
293 <        inp_storage_subdir = ''#jbt.inputStorageSubdir()
293 >        inp_storage_subdir = ''
294          
295          title = '# This JDL was generated by '+\
296                  common.prog_name+' (version '+common.prog_version_str+')\n'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines