コード例 #1
0
# for each value in testRange, needs 1 call for fid and 1 call for deriv for each param
N = 1 + len(paramList)

print "Number of tasks: ", N
tasksPerCore = np.ceil(float(N) / float(numCoresAsked) * 8 / numCores)
numCoresNeed = float(N) / tasksPerCore
print "Tasks per core: ", tasksPerCore
print "Needed cores: ", int(np.ceil(numCoresNeed)), "/", numCoresAsked
print "Needed nodes: ", int(np.ceil(numCoresNeed /
                                    numCores)), "/", numCoresAsked / 8
#sys.exit()

commandPreFix = 'source ~/.bashrc'
Jobs = jobMaker(projectName=projectName,
                commandPreFix=commandPreFix,
                numCores=numCores,
                queue=queue,
                walltime=walltime,
                jobRoot='/gpfs/scratch/nhnguyen/makeDerivs/jobs/')
optionsCommon = ' --spec ' + spec + ' --out_pre ' + out_pre + ' --AccuracyBoost ' + str(
    AccuracyBoost)
i = 0
nowCommand = ''

# Save fiducials
i += 1
saveSuffix = out_pre + '_' + spec
options = optionsCommon + ' --paramName 0 --stepSize 0 --output ' + saveRoot + saveSuffix
nowCommand += ' python ' + os.environ[
    'FISHER_DIR'] + 'bin/cluster-submit/makeDerivs_script.py ' + options + ';'
if i % tasksPerCore == 0 or i == N:
    Jobs.addJob(nowCommand)
コード例 #2
0
    N += len(testRange[testParam])
    print testParam, testRange[testParam]
print "Number of tasks: ", N
print "Number of cores running per node:", numCores, "/", 8
tasksPerCore = np.ceil(float(N) / float(numCoresAsked) * 8 / numCores)
numCoresNeed = float(N) / tasksPerCore
print "Tasks per core: ", int(tasksPerCore)
print "Needed cores: ", int(np.ceil(numCoresNeed)), "/", numCoresAsked
print "Needed nodes: ", int(np.ceil(numCoresNeed /
                                    numCores)), "/", numCoresAsked / 8
#sys.exit()

commandPreFix = 'source ~/.bashrc'
Jobs = jobMaker(projectName=projectName,
                commandPreFix=commandPreFix,
                numCores=numCores,
                queue=queue,
                walltime=walltime,
                jobRoot='/gpfs/scratch/nhnguyen/testStepSizeDump/jobs/')
#optionsCommon = ' --spec ' + spec + ' --out_pre ' + out_pre + ' --AccuracyBoost ' + str(AccuracyBoost)
optionsCommon = ''
i = 0
nowCommand = ''
#prefix = ''
for testParam in testList:
    index = 0
    for testVal in testRange[testParam]:
        #prefix = testParam+'_'+str(testVal)
        index += 1
        i += 1
        saveSuffix = out_pre + spec
        #saveSuffix = out_pre+spec+"_"+prefix+"_dCls_"+testParam+".csv"
コード例 #3
0
        testList.append(key)

# a magical formula                                                                                                                                            
N = 0
N = len(testList)
#N = 1
print "Number of tasks: ", N
tasksPerCore = np.ceil(float(N)/float(numCoresAsked))
numCores = float(N) / tasksPerCore
print "Tasks per core: ",tasksPerCore
print "Needed cores: ",int(np.ceil(numCores)),"/",numCoresAsked
print "Needed nodes: ",int(np.ceil(numCores/8)),"/",numCoresAsked/8
#sys.exit()

commandPreFix = 'source ~/.bashrc'
Jobs = jobMaker(projectName=projectName,commandPreFix=commandPreFix,numCores=8,queue=queue,walltime=walltime,jobRoot='/gpfs/scratch/nhnguyen/testmnuDump/jobs/')
#optionsCommon = ' --spec ' + spec + ' --out_pre ' + out_pre + ' --AccuracyBoost ' + str(AccuracyBoost)
optionsCommon = ''
i = 0
nowCommand = ''
#prefix = ''
for testParam in testList:
        #prefix = testParam+'_'+str(testVal)
        i+=1
        saveSuffix = out_pre+spec
        options = optionsCommon + ' --testParam ' + testParam + ' --output ' + saveRoot+saveSuffix
        nowCommand += ' python '+os.environ['FISHER_DIR']+'/bin/cluster-submit/testmnu_driver_script.py '+options+';'
        if i%tasksPerCore == 0 or i==N:
                Jobs.addJob(nowCommand)
                nowCommand = ''
#print len(Jobs.scripts),Jobs.scripts 
コード例 #4
0
ファイル: makeDerivs_submit.py プロジェクト: msyriac/pyfisher
# a magical formula
numCores=1
N = 0
# for each value in testRange, needs 1 call for fid and 1 call for deriv for each param
N=1+len(paramList)

print "Number of tasks: ", N
tasksPerCore = np.ceil(float(N)/float(numCoresAsked)*8/numCores)
numCoresNeed = float(N) / tasksPerCore
print "Tasks per core: ",tasksPerCore
print "Needed cores: ",int(np.ceil(numCoresNeed)),"/",numCoresAsked
print "Needed nodes: ",int(np.ceil(numCoresNeed/numCores)),"/",numCoresAsked/8
#sys.exit()

commandPreFix = 'source ~/.bashrc'
Jobs = jobMaker(projectName=projectName,commandPreFix=commandPreFix,numCores=numCores,queue=queue,walltime=walltime,jobRoot='/gpfs/scratch/nhnguyen/makeDerivs/jobs/')
optionsCommon = ' --spec ' + spec + ' --out_pre ' + out_pre + ' --AccuracyBoost ' + str(AccuracyBoost)
i = 0
nowCommand = ''

# Save fiducials
i+=1
saveSuffix = out_pre+'_'+spec
options = optionsCommon + ' --paramName 0 --stepSize 0 --output ' + saveRoot+saveSuffix 
nowCommand += ' python '+os.environ['FISHER_DIR']+'bin/cluster-submit/makeDerivs_script.py '+options+';'
if i%tasksPerCore == 0 or i==N:
	Jobs.addJob(nowCommand)
	nowCommand = ''
# Calculate Derivatives
for paramName in paramList:
	i+=1
コード例 #5
0
N = 0
for testParam in testList:
        # for each value in testRange, needs 1 call for fid
        N+=len(testRange[testParam])
	print testParam,testRange[testParam]
print "Number of tasks: ", N
print "Number of cores running per node:",numCores,"/",8
tasksPerCore = np.ceil(float(N)/float(numCoresAsked)*8/numCores)
numCoresNeed = float(N) / tasksPerCore
print "Tasks per core: ",int(tasksPerCore)
print "Needed cores: ",int(np.ceil(numCoresNeed)),"/",numCoresAsked
print "Needed nodes: ",int(np.ceil(numCoresNeed/numCores)),"/",numCoresAsked/8
#sys.exit()

commandPreFix = 'source ~/.bashrc'
Jobs = jobMaker(projectName=projectName,commandPreFix=commandPreFix,numCores=numCores,queue=queue,walltime=walltime,jobRoot='/gpfs/scratch/nhnguyen/oldtestStepSize/jobs/')
optionsCommon = ' --spec ' + spec + ' --out_pre ' + out_pre + ' --AccuracyBoost ' + str(AccuracyBoost)
i = 0
nowCommand = ''
prefix = ''
for testParam in testList:
        for testVal in testRange[testParam]:
                prefix = testParam+'_'+str(testVal)
                # Save fiducials
                i+=1
                saveSuffix = out_pre+spec+"_"+prefix+"_fCls.csv"
                options = optionsCommon + ' --testParam ' + testParam + ' --testVal ' + str(testVal) + ' --output ' + saveRoot+saveSuffix 
                nowCommand += ' python '+os.environ['FISHER_DIR']+'bin/cluster-submit/oldtestStepSize_script.py '+options+';'
		if i%tasksPerCore == 0 or i==N:
			Jobs.addJob(nowCommand)
                        nowCommand = ''