本文整理汇总了Python中DIRAC.Resources.Computing.ComputingElement.ComputingElement.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ComputingElement.__init__方法的具体用法?Python ComputingElement.__init__怎么用?Python ComputingElement.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIRAC.Resources.Computing.ComputingElement.ComputingElement
的用法示例。
在下文中一共展示了ComputingElement.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例2: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例3: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
def __init__( self, ceUniqueID ):
""" Standard constructor.
"""
ComputingElement.__init__( self, ceUniqueID )
self.ceType = CE_NAME
self.submittedJobs = 0
self.mandatoryParameters = MANDATORY_PARAMETERS
示例4: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例5: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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()
示例6: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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 = ''
示例7: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例8: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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 = ''
示例9: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例10: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例11: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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']
示例12: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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"]
示例13: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例14: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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
示例15: __init__
# 需要导入模块: from DIRAC.Resources.Computing.ComputingElement import ComputingElement [as 别名]
# 或者: from DIRAC.Resources.Computing.ComputingElement.ComputingElement import __init__ [as 别名]
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)