示例#1
0
 def __init__( self, ceUniqueID, cores = 0 ):
   """ Standard constructor.
   """
   ComputingElement.__init__( self, ceUniqueID )
   self.ceType = "Pool"
   self.submittedJobs = 0
   if cores > 0:
     self.cores = cores
   else:  
     self.cores = getNumberOfCores()
   self.pPool = ProcessPool( self.cores, self.cores, poolCallback = self.finalizeJob )
   self.taskID = 0
   self.coresPerTask = {}
示例#2
0
 def __init__(self, ceUniqueID, cores=0):
     """ Standard constructor.
 """
     ComputingElement.__init__(self, ceUniqueID)
     self.ceType = "Pool"
     self.submittedJobs = 0
     if cores > 0:
         self.cores = cores
     else:
         self.cores = getNumberOfCores()
     self.pPool = ProcessPool(self.cores,
                              self.cores,
                              poolCallback=self.finalizeJob)
     self.taskID = 0
     self.coresPerTask = {}
示例#3
0
  def __getProcessors( self ):
    """
    Return number of processors from gConfig and a boolean corresponding to WholeNode option
    """
    tag = gConfig.getValue( '/Resources/Computing/CEDefaults/Tag', None )

    if tag is None: return 1, False

    self.log.verbose( "__getProcessors: /Resources/Computing/CEDefaults/Tag", repr( tag ) )

    # look for a pattern like "12345Processors" in tag list
    m = re.match( r'^(.*\D)?(?P<processors>\d+)Processors([ \t,].*)?$', tag )
    if m:
      return int( m.group( 'processors' ) ), False

    # In WholeNode case, detect number of cores from the host
    if re.match( r'^(.*,\s*)?WholeNode([ \t,].*)?$', tag ):
      return getNumberOfCores(), True

    return 1, False
示例#4
0
    def __getProcessors(self):
        """
    Return number of processors from gConfig and a boolean corresponding to WholeNode option
    """
        tag = gConfig.getValue('/Resources/Computing/CEDefaults/Tag', None)

        if tag is None: return 1, False

        self.log.verbose(
            "__getProcessors: /Resources/Computing/CEDefaults/Tag", repr(tag))

        # look for a pattern like "12345Processors" in tag list
        m = re.match(r'^(.*\D)?(?P<processors>\d+)Processors([ \t,].*)?$', tag)
        if m:
            return int(m.group('processors')), False

        # In WholeNode case, detect number of cores from the host
        if re.match(r'^(.*,\s*)?WholeNode([ \t,].*)?$', tag):
            return getNumberOfCores(), True

        return 1, False