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.16 by ewv, Mon Jan 26 19:43:48 2009 UTC vs.
Revision 1.18 by fanzago, Mon Feb 16 23:24:34 2009 UTC

# Line 10 | Line 10 | from crab_exceptions import CrabExceptio
10  
11   import common
12   import os
13 <
13 > import socket
14 > import sha
15  
16   class SchedulerCondor(SchedulerLocal) :
17      """
# Line 34 | Line 35 | class SchedulerCondor(SchedulerLocal) :
35          """
36  
37          SchedulerLocal.configure(self, cfg_params)
38 <        self.environment_unique_identifier = '${HOSTNAME}_${CONDOR_ID}_' \
39 <                                             + common._db.queryTask('name')
38 >        taskHash = sha.new(common._db.queryTask('name')).hexdigest()
39 >        self.environment_unique_identifier = "https://" + socket.gethostname() + \
40 >                                              '/' + taskHash + "/${NJob}"
41  
42          try:
43              tmp =  cfg_params['CMSSW.datasetpath']
# Line 51 | Line 53 | class SchedulerCondor(SchedulerLocal) :
53  
54          self.return_data = cfg_params.get('USER.return_data', 0)
55          self.copy_data   = cfg_params.get("USER.copy_data", 0)
56 +        self.backup_copy = cfg_params.get('USER.backup_copy',0)
57  
58          if ( int(self.return_data) == 0 and int(self.copy_data) == 0 ):
59              msg = 'Error: return_data and copy_data cannot be set both to 0\n'
# Line 68 | Line 71 | class SchedulerCondor(SchedulerLocal) :
71              common.logger.message(msg)
72              raise CrabException(msg)
73  
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 +
79          if int(self.copy_data) == 1:
80              self.SE = cfg_params.get('USER.storage_element', None)
81              if not self.SE:
82                  msg = "Error. The [USER] section has no 'storage_element'"
83                  common.logger.message(msg)
84                  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)
90  
91              self.proxyValid = 0
92              self.dontCheckProxy = int(cfg_params.get("EDG.dont_check_proxy",0))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines