コード例 #1
0
    def _addCEConfigDefaults(self):
        """Method to make sure all necessary Configuration Parameters are defined
    """
        # First assure that any global parameters are loaded
        ComputingElement._addCEConfigDefaults(self)
        # Now batch system specific ones
        if "ExecQueue" not in self.ceParameters:
            self.ceParameters["ExecQueue"] = self.ceParameters.get("Queue", "")

        if "SharedArea" not in self.ceParameters:
            # . isn't a good location, move to $HOME
            self.ceParameters["SharedArea"] = "$HOME"

        if "BatchOutput" not in self.ceParameters:
            self.ceParameters["BatchOutput"] = "data"

        if "BatchError" not in self.ceParameters:
            self.ceParameters["BatchError"] = "data"

        if "ExecutableArea" not in self.ceParameters:
            self.ceParameters["ExecutableArea"] = "data"

        if "InfoArea" not in self.ceParameters:
            self.ceParameters["InfoArea"] = "info"

        if "WorkArea" not in self.ceParameters:
            self.ceParameters["WorkArea"] = "work"

        if "SubmitOptions" not in self.ceParameters:
            self.ceParameters["SubmitOptions"] = "-"
コード例 #2
0
  def _addCEConfigDefaults( self ):
    """Method to make sure all necessary Configuration Parameters are defined
    """
    # First assure that any global parameters are loaded
    ComputingElement._addCEConfigDefaults( self )
    # Now batch system specific ones
    if 'ExecQueue' not in self.ceParameters:
      self.ceParameters['ExecQueue'] = self.ceParameters.get( 'Queue', '' )

    if 'SharedArea' not in self.ceParameters:
      defaultPath = os.environ.get( 'HOME', '.' )
      self.ceParameters['SharedArea'] = gConfig.getValue( '/LocalSite/InstancePath', defaultPath )

    if 'BatchOutput' not in self.ceParameters:
      self.ceParameters['BatchOutput'] = 'data'

    if 'BatchError' not in self.ceParameters:
      self.ceParameters['BatchError'] = 'data'

    if 'ExecutableArea' not in self.ceParameters:
      self.ceParameters['ExecutableArea'] = 'data'

    if 'InfoArea' not in self.ceParameters:
      self.ceParameters['InfoArea'] = 'info'

    if 'WorkArea' not in self.ceParameters:
      self.ceParameters['WorkArea'] = 'work'
コード例 #3
0
ファイル: SSHComputingElement.py プロジェクト: cgrefe/DIRAC
  def _addCEConfigDefaults( self ):
    """Method to make sure all necessary Configuration Parameters are defined
    """
    # First assure that any global parameters are loaded
    ComputingElement._addCEConfigDefaults( self )
    # Now batch system specific ones
    if 'ExecQueue' not in self.ceParameters:
      self.ceParameters['ExecQueue'] = self.ceParameters.get( 'Queue', '' )

    if 'SharedArea' not in self.ceParameters:
      self.ceParameters['SharedArea'] = '.'

    if 'BatchOutput' not in self.ceParameters:
      self.ceParameters['BatchOutput'] = 'data' 

    if 'BatchError' not in self.ceParameters:
      self.ceParameters['BatchError'] = 'data' 

    if 'ExecutableArea' not in self.ceParameters:
      self.ceParameters['ExecutableArea'] = 'data' 

    if 'InfoArea' not in self.ceParameters:
      self.ceParameters['InfoArea'] = 'info'
      
    if 'WorkArea' not in self.ceParameters:
      self.ceParameters['WorkArea'] = 'work'  
      
    if 'SubmitOptions' not in self.ceParameters:
      self.ceParameters['SubmitOptions'] = '-'    
コード例 #4
0
ファイル: ARCComputingElement.py プロジェクト: vipersec/DIRAC
 def __init__(self, ceUniqueID):
     """ Standard constructor.
 """
     ComputingElement.__init__(self, ceUniqueID)
     self.ceType = CE_NAME
     self.submittedJobs = 0
     self.mandatoryParameters = MANDATORY_PARAMETERS
     self.pilotProxy = ""
     self.queue = ""
     self.outputURL = "gsiftp://localhost"
     self.gridEnv = ""
     self.ceHost = self.ceName
     self.usercfg = arc.common.UserConfig()
     if "Host" in self.ceParameters:
         self.ceHost = self.ceParameters["Host"]
     if "GridEnv" in self.ceParameters:
         self.gridEnv = self.ceParameters["GridEnv"]
     # Used in getJobStatus
     self.mapStates = {
         "Accepted": "Scheduled",
         "Preparing": "Scheduled",
         "Submitting": "Scheduled",
         "Queuing": "Scheduled",
         "Hold": "Scheduled",
         "Undefined": "Unknown",
         "Running": "Running",
         "Finishing": "Running",
         "Deleted": "Killed",
         "Killed": "Killed",
         "Failed": "Failed",
         "Finished": "Done",
         "Other": "Done",
     }
     self.__getXRSLExtraString()  # Do this after all other initialisations, in case something barks
コード例 #5
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   self.ceType = CE_NAME
   self.submittedJobs = 0
   self.mandatoryParameters = MANDATORY_PARAMETERS
   self.pilotProxy = ''
   self.queue = ''
   self.outputURL = 'gsiftp://localhost'
   self.gridEnv = ''
   self.ceHost = self.ceName
   self.usercfg = arc.common.UserConfig()
   if 'Host' in self.ceParameters:
     self.ceHost = self.ceParameters['Host']
   if 'GridEnv' in self.ceParameters:
     self.gridEnv = self.ceParameters['GridEnv']
   # Used in getJobStatus
   self.mapStates = { 'Accepted'   : 'Scheduled',
                      'Preparing'  : 'Scheduled',
                      'Submitting' : 'Scheduled',
                      'Queuing'    : 'Scheduled',
                      'Hold'       : 'Scheduled',
                      'Undefined'  : 'Unknown',
                      'Running'    : 'Running',
                      'Finishing'  : 'Running',
                      'Deleted' : 'Killed',
                      'Killed'  : 'Killed',
                      'Failed'  : 'Failed',
                      'Finished': 'Done',
                      'Other'   : 'Done'
     }
   self.__getXRSLExtraString() # Do this after all other initialisations, in case something barks
コード例 #6
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   self.minProxyTime = gConfig.getValue( '/Registry/MinProxyLifeTime', 10800 ) #secs
   self.defaultProxyTime = gConfig.getValue( '/Registry/DefaultProxyLifeTime', 86400 ) #secs
   self.proxyCheckPeriod = gConfig.getValue( '/Registry/ProxyCheckingPeriod', 3600 ) #secs
   self.submittedJobs = 0
コード例 #7
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   
   self.ceType = CE_NAME
   self.submittedJobs = 0
   self.mandatoryParameters = MANDATORY_PARAMETERS
コード例 #8
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )

    self.ceType = ''
    self.execution = "Local"
    self.batchSystem = self.ceParameters.get( 'BatchSystem', 'Host' )
    self.batchModuleFile = None
    self.submittedJobs = 0
    self.userName = getpass.getuser()
コード例 #9
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )

    self.ceType = 'SSH'
    self.execution = "SSH"
    self.batchSystem = 'Host'
    self.submittedJobs = 0
    self.outputTemplate = ''
    self.errorTemplate = ''
コード例 #10
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )

    self.ceType = CE_NAME
    self.controlScript = ''
    self.finalScript = ''
    self.submittedJobs = 0
    self.userName = getpass.getuser()
    self.mandatoryParameters = MANDATORY_PARAMETERS
コード例 #11
0
ファイル: CREAMComputingElement.py プロジェクト: hanyl/DIRAC
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )

    self.ceType = CE_NAME
    self.submittedJobs = 0
    self.mandatoryParameters = MANDATORY_PARAMETERS
    self.pilotProxy = ''
    self.queue = ''
    self.outputURL = 'gsiftp://localhost'
    self.gridEnv = ''
コード例 #12
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """

    ComputingElement.__init__( self, ceUniqueID )

    self.ceType = CE_NAME
    self.mandatoryParameters = []
    self.wsdl = None
    self.BOINCClient = None
#define a job prefix based on the wsdl url
    self.suffix = None
コード例 #13
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )
    self.submittedJobs = 0

    self.queue = self.ceConfigDict['Queue']
    self.execQueue = self.ceConfigDict['ExecQueue']
    self.log.info( "Using queue: ", self.queue )
    self.hostname = socket.gethostname()
    self.sharedArea = self.ceConfigDict['SharedArea']
    self.batchOutput = self.ceConfigDict['BatchOutput']
    self.batchError = self.ceConfigDict['BatchError']
コード例 #14
0
 def __init__(self, ceUniqueID):
   """ Standard constructor.
   """
   ComputingElement.__init__(self, ceUniqueID)
   self.ceType = "Pool"
   self.log = gLogger.getSubLogger('Pool')
   self.submittedJobs = 0
   self.processors = 1
   self.pPool = None
   self.taskID = 0
   self.processorsPerTask = {}
   self.userNumberPerTask = {}
   self.useSudo = False
コード例 #15
0
  def _addCEConfigDefaults( self ):
    """Method to make sure all necessary Configuration Parameters are defined
    """
    # First assure that any global parameters are loaded
    ComputingElement._addCEConfigDefaults( self )
    # Now Torque specific ones
    if 'ExecQueue' not in self.ceConfigDict:
      self.ceConfigDict['ExecQueue'] = self.ceConfigDict['Queue']

    if 'SharedArea' not in self.ceConfigDict:
      self.ceConfigDict['SharedArea'] = ''

    if 'BatchOutput' not in self.ceConfigDict:
      self.ceConfigDict['BatchOutput'] = os.path.join( gConfig.getValue( '/LocalSite/InstancePath', rootPath ), 'data' )

    if 'BatchError' not in self.ceConfigDict:
      self.ceConfigDict['BatchError'] = os.path.join( gConfig.getValue( '/LocalSite/InstancePath', rootPath ), 'data' )
コード例 #16
0
ファイル: ARCComputingElement.py プロジェクト: sposs/DIRAC
    def __init__(self, ceUniqueID):
        """ Standard constructor.
    """
        ComputingElement.__init__(self, ceUniqueID)

        self.ceType = CE_NAME
        self.submittedJobs = 0
        self.mandatoryParameters = MANDATORY_PARAMETERS
        self.pilotProxy = ""
        self.queue = ""
        self.outputURL = "gsiftp://localhost"
        self.gridEnv = ""
        self.ceHost = self.ceName
        if "Host" in self.ceParameters:
            self.ceHost = self.ceParameters["Host"]
        if "GridEnv" in self.ceParameters:
            self.gridEnv = self.ceParameters["GridEnv"]
コード例 #17
0
  def __init__( self, ceUniqueID ):
    """ Standard constructor.
    """
    ComputingElement.__init__( self, ceUniqueID )
    self.submittedJobs = 0

    self.queue = self.ceConfigDict['Queue']
    self.execQueue = self.ceConfigDict['ExecQueue']
    self.log.info( "Using queue: ", self.queue )
    self.hostname = socket.gethostname()
    self.sharedArea = self.ceConfigDict['SharedArea']
    self.batchOutput = self.ceConfigDict['BatchOutput']
    self.batchError = self.ceConfigDict['BatchError']
    self.userName = self.ceConfigDict['UserName']
    self.removeOutput = True
    if 'RemoveOutput' in self.ceParameters:
      if self.ceParameters['RemoveOutput'].lower()  in ['no', 'false', '0']:
        self.removeOutput = False
コード例 #18
0
    def _addCEConfigDefaults(self):
        """Method to make sure all necessary Configuration Parameters are defined
    """
        # First assure that any global parameters are loaded
        ComputingElement._addCEConfigDefaults(self)
        # Now Torque specific ones
        if "ExecQueue" not in self.ceConfigDict:
            self.ceConfigDict["ExecQueue"] = self.ceConfigDict["Queue"]

        if "SharedArea" not in self.ceConfigDict:
            self.ceConfigDict["SharedArea"] = ""

        if "BatchOutput" not in self.ceConfigDict:
            self.ceConfigDict["BatchOutput"] = os.path.join(
                gConfig.getValue("/LocalSite/InstancePath", rootPath), "data"
            )

        if "BatchError" not in self.ceConfigDict:
            self.ceConfigDict["BatchError"] = os.path.join(
                gConfig.getValue("/LocalSite/InstancePath", rootPath), "data"
            )
コード例 #19
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   self.__errorCodes = { 127 : 'Shell exited, command not found',
                         129 : 'Shell interrupt signal 1 (SIGHUP)',
                         130 : 'Shell interrupt signal 2 (SIGINT)',
                         201 : 'glexec failed with client error',
                         202 : 'glexec failed with internal error',
                         203 : 'glexec failed with authorization error'
                       }
   self.__gl = False
   self.__mktmp = False
   self.__proxyObj = False
   self.__execFile = False
   self.__glDir = False
   self.__glBaseDir = False
   self.__pilotProxyLocation = False
   self.__payloadProxyLocation = False
   self.__glCommand = False
   self.__jobData = {}
   random.seed()
   ComputingElement.__init__( self, ceUniqueID )
   self.submittedJobs = 0
コード例 #20
0
 def __init__(self, ceUniqueID):
   """ Standard constructor.
   """
   ComputingElement.__init__(self, ceUniqueID)
   self.ceType = CE_NAME
   self.submittedJobs = 0
   self.mandatoryParameters = MANDATORY_PARAMETERS
   self.pilotProxy = ''
   self.queue = ''
   self.outputURL = 'gsiftp://localhost'
   self.gridEnv = ''
   self.ceHost = self.ceName
   self.usercfg = arc.common.UserConfig()
   # set the timeout to the default 20 seconds in case the UserConfig constructor did not
   self.usercfg.Timeout(20)  # pylint: disable=pointless-statement
   if 'Host' in self.ceParameters:
     self.ceHost = self.ceParameters['Host']
   if 'GridEnv' in self.ceParameters:
     self.gridEnv = self.ceParameters['GridEnv']
   # Used in getJobStatus
   self.mapStates = {'Accepted': 'Scheduled',
                     'Preparing': 'Scheduled',
                     'Submitting': 'Scheduled',
                     'Queuing': 'Scheduled',
                     'Undefined': 'Unknown',
                     'Running': 'Running',
                     'Finishing': 'Running',
                     'Deleted': 'Killed',
                     'Killed': 'Killed',
                     'Failed': 'Failed',
                     'Hold': 'Failed',
                     'Finished': 'Done',
                     'Other': 'Done'}
   # Do these after all other initialisations, in case something barks
   self.xrslExtraString = self.__getXRSLExtraString()
   self.xrslMPExtraString = self.__getXRSLExtraString(multiprocessor=True)
コード例 #21
0
 def _addCEConfigDefaults(self):
   """Method to make sure all necessary Configuration Parameters are defined
   """
   # First assure that any global parameters are loaded
   ComputingElement._addCEConfigDefaults(self)
コード例 #22
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   self.submittedJobs = 0
コード例 #23
0
 def _addCEConfigDefaults(self):
     """Method to make sure all necessary Configuration Parameters are defined"""
     # First assure that any global parameters are loaded
     ComputingElement._addCEConfigDefaults(self)
コード例 #24
0
 def __init__( self, ceUniqueID ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   self.submittedJobs = 0