当前位置: 首页>>代码示例>>Python>>正文


Python Configuration.add方法代码示例

本文整理汇总了Python中Configuration.Configuration.add方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.add方法的具体用法?Python Configuration.add怎么用?Python Configuration.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configuration.Configuration的用法示例。


在下文中一共展示了Configuration.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getConfiguration

# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import add [as 别名]
    def getConfiguration(self):
        """Note that this needs the xdaq launchers running since it has to query the remote hosts
        to get numa information based on the output of numactl --hardware"""
        resetInstanceNumbers()

        evmConfig = [
            ('inputSource','string','Local'),
            ('allocateBlockSize','unsignedInt','0x20000'),
            ('maxAllocateTime','unsignedInt','250'),
            ('socketBufferFIFOCapacity','unsignedInt','1024'),
            ('grantFIFOCapacity','unsignedInt','16384'),
            ('fragmentFIFOCapacity','unsignedInt','256'),
            ('fragmentRequestFIFOCapacity','unsignedInt','80')
            ]
        if self.args['canonicalEVM']:
            evmConfig.append( ('fedSourceIds','unsignedInt',range(1000,1008)) )
            evmConfig.append( ('blockSize','unsignedInt','0x3fff0') )
            evmConfig.append( ('numberOfResponders','unsignedInt','6') )
        else:
            evmConfig.append( ('fedSourceIds','unsignedInt',(1000,)) )
            evmConfig.append( ('blockSize','unsignedInt','0x4000') )
            evmConfig.append( ('numberOfResponders','unsignedInt','2') )
        ruConfig = [
            ('inputSource','string','Local'),
            ('blockSize','unsignedInt','0x3fff0'),
            ('numberOfResponders','unsignedInt','6'),
            ('socketBufferFIFOCapacity','unsignedInt','1024'),
            ('grantFIFOCapacity','unsignedInt','16384'),
            ('fragmentFIFOCapacity','unsignedInt','256'),
            ('fragmentRequestFIFOCapacity','unsignedInt','6000')
            ]
        buConfig = [
            ('lumiSectionTimeout','unsignedInt','0'),
            ('maxEvtsUnderConstruction','unsignedInt','320'),
            ('eventsPerRequest','unsignedInt','8'),
            ('superFragmentFIFOCapacity','unsignedInt','12800'),
            ('numberOfBuilders','unsignedInt','5')
            ]
        if self.args['outputDisk']:
            buConfig.append( ('dropEventData','boolean','false') )
            buConfig.append( ('rawDataDir','string',self.args['outputDisk']) )
            buConfig.append( ('metaDataDir','string',self.args['outputDisk']) )
            buConfig.append( ('deleteRawDataFiles','boolean','true') )
            buConfig.append( ('ignoreResourceSummary','boolean','true') )
            buConfig.append( ('maxEventsPerFile','unsignedInt','100') )
        else:
            buConfig.append( ('dropEventData','boolean','true') )

        config = Configuration(self._symbolMap,self.args['numa'])
        # EVM
        if self.args['foldedEVM']:
            config.add( RUBU(self._symbolMap,evmConfig,buConfig) )
        else:
            config.add( RU(self._symbolMap,evmConfig) )
        # RUs with 8 FEDs each
        for ru in range(self.args['nRUs']):
            config.add( RU(self._symbolMap,
                               ruConfig +
                               [('fedSourceIds','unsignedInt',range(8*ru,8*ru+8)),]
                               ) )
        # BUs
        for bu in range(self.args['nBUs']):
            config.add( BU(self._symbolMap,buConfig) )
        # RUBUs with 8 FEDs each
        for rubu in range(self.args['nRUBUs']):
            config.add( RUBU(self._symbolMap,
                                 ruConfig +
                                 [('fedSourceIds','unsignedInt',range(8*rubu+1100,8*rubu+1108)),] #avoid softFED
                                 , buConfig
                                 ) )
        return config
开发者ID:mommsen,项目名称:evb,代码行数:73,代码来源:runBenchmarks.py


注:本文中的Configuration.Configuration.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。