Example #1
0
elif quickNameSuffix == 'Steele':
	user='******'
	runLocation = 'steele'
quickName = quickNamePrefix + '-' + quickNameSuffix
numberOfJobs = [simsPerRep, simsPerRep*repsPerProc*procsPerNode*nodes]

# Match incoming quickName against that from the settings file:
if not jobQuickNameIn == quickName:
	print 'Quicknames from input file and settings file dont match; aborting'
	sys.exit()

# Grab the name of the settings for the run:
settings, FD, numberOfJobs, gitVersion = pt.unpickle(os.path.join(os.getcwd(),saveResultDir,settingsFile))

# Save the day:
resultList = pt.getFromPickleJar(loadDir = outputDir, fileNameSubString = 'simResults.dat')
print resultList
arrayLength = len(resultList[0][0])

resultsArray = numpy.zeros(arrayLength, dtype=float)
crossTimesArray = numpy.zeros(arrayLength, dtype=float)
for i in range(len(resultList)):
	resultsArray = resultsArray + resultList[i][0]
	crossTimesArray = crossTimesArray + resultList[i][1]

crossTimesArray = crossTimesArray/numberOfJobs[1]
resultsArray = resultsArray/numberOfJobs[1]
			
# Reshape results and save to output:	
params = settings.keys()
params.sort()
Example #2
0
#
#  DDMCube_Slave.py
#  DDMCubeTeraGrid
#
#  Created by nicain on 4/29/10.
#  Copyright (c) 2010 __MyCompanyName__. All rights reserved.
#

################################################################################
# Preamble
################################################################################

# Import packages:
import DDMCube
import analysisTools as at
import pbsTools as pt

# Grab the name of the settings for the run:
settings, FD, numberOfJobs, gitVersion = pt.getFromPickleJar(loadDir = './', fileNameSubString = '.settings')[0]

# Run the sims:
(resultsArray, crossTimesArray) = DDMCube.DDMOU(settings, FD, numberOfJobs[0])

# Save output:
pt.pickle((resultsArray, crossTimesArray),saveFileName = 'simResults.dat')



#  Copyright (c) 2010 __MyCompanyName__. All rights reserved.
#

################################################################################
# Preamble
################################################################################

# Import packages:
from cythonOvershootSIP import getOvershootDist
import pbsTools as pt
import pylab as pl
import sys
import time

# Grab the settings from the file:
settingsDict = pt.getFromPickleJar(loadDir = './', fileNameSubString = '.settings')[0]

# Grab the index for the current job:
thetaInd = int(sys.argv[1])

# Write down the settings for the job:
rP, rN, corr, N, theta, dt, nSims, maxY = settingsDict[thetaInd]

# Run the sim, recovering monte carlo data:
tic = time.time()
overShootTemp = getOvershootDist(rP, rN, corr, N, theta-.01, dt, nSims)
print time.time()-tic, 'sec Elapsed'

# Make the histogram:
bins = range(0,maxY)
overShootPref = overShootTemp[overShootTemp>0]-theta