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

Comparing COMP/CRAB/python/SchedulerCondor.py (file contents):
Revision 1.18 by fanzago, Mon Feb 16 23:24:34 2009 UTC vs.
Revision 1.20 by spiga, Fri Mar 6 16:49:55 2009 UTC

# Line 25 | Line 25 | class SchedulerCondor(SchedulerLocal) :
25          SchedulerLocal.__init__(self,"CONDOR")
26          self.datasetPath   = None
27          self.selectNoInput = None
28 +        self.return_data   = 0
29 +        self.copy_data     = 0
30 +
31          self.environment_unique_identifier = None
32          return
33  
# Line 36 | Line 39 | class SchedulerCondor(SchedulerLocal) :
39  
40          SchedulerLocal.configure(self, cfg_params)
41          taskHash = sha.new(common._db.queryTask('name')).hexdigest()
42 <        self.environment_unique_identifier = "https://" + socket.gethostname() + \
43 <                                              '/' + taskHash + "/${NJob}"
42 >        self.environment_unique_identifier = "https://" + \
43 >            socket.gethostname() + '/' + taskHash + "/${NJob}"
44  
45          try:
46              tmp =  cfg_params['CMSSW.datasetpath']
# Line 53 | Line 56 | class SchedulerCondor(SchedulerLocal) :
56  
57          self.return_data = cfg_params.get('USER.return_data', 0)
58          self.copy_data   = cfg_params.get("USER.copy_data", 0)
56        self.backup_copy = cfg_params.get('USER.backup_copy',0)
59  
60 <        if ( int(self.return_data) == 0 and int(self.copy_data) == 0 ):
61 <            msg = 'Error: return_data and copy_data cannot be set both to 0\n'
62 <            msg = msg + 'Please modify your crab.cfg file\n'
60 >        if int(self.return_data) == 0 and int(self.copy_data) == 0:
61 >            msg =  'Error: return_data and copy_data cannot both be set to 0\n'
62 >            msg += 'Please modify your crab.cfg file\n'
63              raise CrabException(msg)
64  
65 <        if ( int(self.return_data) == 1 and int(self.copy_data) == 1 ):
66 <            msg = 'Error: return_data and copy_data cannot be set both to 1\n'
67 <            msg = msg + 'Please modify your crab.cfg file\n'
65 >        if int(self.return_data) == 1 and int(self.copy_data) == 1:
66 >            msg =  'Error: return_data and copy_data cannot both be set to 1\n'
67 >            msg += 'Please modify your crab.cfg file\n'
68              raise CrabException(msg)
69  
70 <        if ( int(self.copy_data) == 0 and int(self.publish_data) == 1 ):
71 <            msg = 'Warning: publish_data = 1 must be used with copy_data = 1\n'
72 <            msg = msg + 'Please modify copy_data value in your crab.cfg file\n'
70 >        if int(self.copy_data) == 0 and int(self.publish_data) == 1:
71 >            msg =  'Warning: publish_data=1 must be used with copy_data=1\n'
72 >            msg += 'Please modify the copy_data value in your crab.cfg file\n'
73              common.logger.message(msg)
74              raise CrabException(msg)
75  
74        if ( int(self.copy_data) == 0 and int(self.backup_copy) == 1 ):
75            msg = 'Error: copy_data = 0 and backup_data = 1 ==> to use the backup_copy function, the copy_data value has to be = 1\n'
76            msg = msg + 'Please modify copy_data value in your crab.cfg file\n'
77            raise CrabException(msg)
78
76          if int(self.copy_data) == 1:
77              self.SE = cfg_params.get('USER.storage_element', None)
78              if not self.SE:
79                  msg = "Error. The [USER] section has no 'storage_element'"
80                  common.logger.message(msg)
81                  raise CrabException(msg)
85                
86        if ( int(self.backup_copy) == 1 and int(self.publish_data) == 1 ):
87            msg = 'Warning: currently the publication is not supported with the backup copy. Work in progress....\n'
88            common.logger.message(msg)
89            raise CrabException(msg)
82  
83              self.proxyValid = 0
84 <            self.dontCheckProxy = int(cfg_params.get("EDG.dont_check_proxy",0))
85 <            self.proxyServer = cfg_params.get("EDG.proxy_server",'myproxy.cern.ch')
84 >            self.dontCheckProxy = int(cfg_params.get("EDG.dont_check_proxy", 0))
85 >            self.proxyServer = cfg_params.get("EDG.proxy_server", 'myproxy.cern.ch')
86              common.logger.debug(5,'Setting myproxy server to ' + self.proxyServer)
87  
88              self.group = cfg_params.get("EDG.group", None)
# Line 98 | Line 90 | class SchedulerCondor(SchedulerLocal) :
90              self.VO    = cfg_params.get('EDG.virtual_organization', 'cms')
91  
92              self.checkProxy()
93 +
94          self.role  = None
95  
96          return

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines