Beispiel #1
0
    def getParams(self, nodeNum):
        #print className + '::getParams()'

        extra = copy.deepcopy(self.params)

        if 0 == len(self.debugNodeList) or nodeNum in self.debugNodeList:
            if self.debugLevel:
                extra['verbose'] = self.debugLevel
            if self.hermesLevel:
                extra['hermesParams.ctrlMsg.verboseLevel'] = self.hermesLevel

        if self.motifLogFile and nodeNum in self.motifLogNodeList:
            extra['motifLog'] = self.motifLogFile + '-' + str(nodeNum)

        extra['jobId'] = self.jobInfo.jobId()
        extra['hermesParams.netId'] = nodeNum
        extra['hermesParams.netMapId'] = \
         loadUtils.calcNetMapId( nodeNum, self.jobInfo.getNidlist() )
        extra['hermesParams.netMapSize'] = \
         loadUtils.calcNetMapSize( self.jobInfo.getNidlist() )

        extra.update(
            loadUtils.getMotifParams(self.jobInfo.genWorkFlow(nodeNum)))

        return extra
Beispiel #2
0
	def getParams( self, nodeNum ):
		#print className + '::getParams()'

		extra = copy.deepcopy(self.params)

		if 0 == len( self.debugNodeList ) or nodeNum in self.debugNodeList: 
			if self.debugLevel:	
				extra['verbose'] = self.debugLevel 
			if self.hermesLevel:	
				extra['hermesParams.ctrlMsg.verboseLevel'] = self.hermesLevel

		if self.motifLogFile and nodeNum in self.motifLogNodeList:
			extra['motifLog' ] = self.motifLogFile + '-' + str(nodeNum)

		extra['jobId'] = self.jobInfo.jobId() 
		extra['hermesParams.netId'] = nodeNum
		extra['hermesParams.netMapId'] = \
			loadUtils.calcNetMapId( nodeNum, self.jobInfo.getNidlist() )
		extra['hermesParams.netMapSize'] = \
			loadUtils.calcNetMapSize( self.jobInfo.getNidlist() ) 
	
		extra.update( loadUtils.getMotifParams( self.jobInfo.genWorkFlow( nodeNum ) ) )

		return extra
Beispiel #3
0
jobFile = None

for o, a in opts:
    if o in ('--jobFile'):
        jobFile = a
    if o in ('--help'):
        sys.exit('emberLoadJob: options {0} '.format(myOptions))

if not jobFile:
    sys.exit('FATAL: must specify --jobFile')

topo, shape = topoConfig.parseOptions(opts)
platParams = platConfig.parseOptions(opts)

jobs = []

for jobId, nidlist, cmds in loadUtils.getWorkListFromFile(jobFile, {}):
    motifs = []
    for cmd in cmds:
        motif = {}
        motif['cmd'] = cmd
        motifs += [motif]

    numNodes = loadUtils.calcNetMapSize(nidlist)
    job = jobInfo.JobInfoCmd(jobId, numNodes, 1, motifs)
    job.setNidList(nidlist)
    jobs += [job]

emberLoadBase.run(opts, platParams, topo, shape, jobs)
jobFile = None

for o,a in opts:
	if o in ('--jobFile'):
		jobFile = a
	if o in ('--help'):
		sys.exit( 'emberLoadJob: options {0} '.format(myOptions) )

if not jobFile:
	sys.exit('FATAL: must specify --jobFile')

topo, shape = topoConfig.parseOptions(opts)
platParams = platform.parseOptions(opts)

jobs = []

for jobId, nidlist, cmds in loadUtils.getWorkListFromFile( jobFile, {} ):
	motifs = []
	for cmd in cmds:
		motif = {}
		motif['cmd'] = cmd
		motifs += [ motif ]  

	numNodes = loadUtils.calcNetMapSize( nidlist )
	job = jobInfo.JobInfoCmd( jobId, numNodes , 1, motifs ) 
	job.setNidList( nidlist )
	jobs += [job]

emberLoadBase.run( opts, platParams, topo, shape, jobs )