mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
number of zobov threads and subdivisions now part of dataset definition
This commit is contained in:
parent
6868a026f5
commit
b6359bb0a9
5 changed files with 21 additions and 12 deletions
|
@ -48,9 +48,16 @@ numSubvolumes = 1
|
||||||
# prefix to give all outputs
|
# prefix to give all outputs
|
||||||
prefix = "md_"
|
prefix = "md_"
|
||||||
|
|
||||||
# list of desired subsamples
|
# list of desired subsamples - these are in unts of h Mpc^-3!
|
||||||
|
#subSamples = [ 1.0 ]
|
||||||
subSamples = ((0.1, 0.05, 0.01, 0.002, 0.001, 0.0004, 0.0002))
|
subSamples = ((0.1, 0.05, 0.01, 0.002, 0.001, 0.0004, 0.0002))
|
||||||
|
|
||||||
|
# adjust these two parameters given the memory contraints on your system:
|
||||||
|
# numZobovDivisions: how many sub-volumes per dimension will zobov process
|
||||||
|
# numZobovThreads: how many sub-volumes to process at once?
|
||||||
|
numZobovDivisions = 4
|
||||||
|
numZobovThreads = 2
|
||||||
|
|
||||||
# simulation information
|
# simulation information
|
||||||
numPart = 1024*1024*1024
|
numPart = 1024*1024*1024
|
||||||
lbox = 1000 # Mpc/h
|
lbox = 1000 # Mpc/h
|
||||||
|
|
|
@ -88,7 +88,8 @@ for sample in dataSampleList:
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
launchZobov(sample, ZOBOV_PATH, zobovDir=zobovDir, logDir=logDir,
|
launchZobov(sample, ZOBOV_PATH, zobovDir=zobovDir, logDir=logDir,
|
||||||
continueRun=continueRun)
|
continueRun=continueRun, numZobovDivisions=numZobovDivisions,
|
||||||
|
numZobovThreads=numZobovThreads)
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
|
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
|
||||||
|
|
|
@ -115,10 +115,15 @@ workDir = "{voidOutputDir}/{setName}/"
|
||||||
inputDataDir = "{inputDataDir}"
|
inputDataDir = "{inputDataDir}"
|
||||||
figDir = "{figDir}/{setName}/"
|
figDir = "{figDir}/{setName}/"
|
||||||
logDir = "{logDir}/{setName}/"
|
logDir = "{logDir}/{setName}/"
|
||||||
|
|
||||||
|
numZobovDivisions = {numZobovDivisions}
|
||||||
|
numZobovThreads = {numZobovThreads}
|
||||||
"""
|
"""
|
||||||
scriptFile.write(dataInfo.format(setName=setName, figDir=figDir,
|
scriptFile.write(dataInfo.format(setName=setName, figDir=figDir,
|
||||||
logDir=logDir, voidOutputDir=voidOutputDir,
|
logDir=logDir, voidOutputDir=voidOutputDir,
|
||||||
inputDataDir=catalogDir))
|
inputDataDir=catalogDir,
|
||||||
|
numZobovDivisions=numZobovDivisions,
|
||||||
|
numZobovThreads=numZobovThreads))
|
||||||
|
|
||||||
sampleInfo = """
|
sampleInfo = """
|
||||||
newSample = Sample(dataFile = "{dataFile}",
|
newSample = Sample(dataFile = "{dataFile}",
|
||||||
|
@ -139,7 +144,6 @@ newSample = Sample(dataFile = "{dataFile}",
|
||||||
usePecVel = {usePecVel},
|
usePecVel = {usePecVel},
|
||||||
numSubvolumes = {numSubvolumes},
|
numSubvolumes = {numSubvolumes},
|
||||||
mySubvolume = "{mySubvolume}",
|
mySubvolume = "{mySubvolume}",
|
||||||
numSubDivisions = 4,
|
|
||||||
useLightCone = {useLightCone},
|
useLightCone = {useLightCone},
|
||||||
subsample = {subsample})
|
subsample = {subsample})
|
||||||
dataSampleList.append(newSample)
|
dataSampleList.append(newSample)
|
||||||
|
|
|
@ -63,7 +63,6 @@ class Sample:
|
||||||
usePecVel = False
|
usePecVel = False
|
||||||
subsample = 1.0
|
subsample = 1.0
|
||||||
useLightCone = True
|
useLightCone = True
|
||||||
numSubDivisions = 1
|
|
||||||
numSubvolumes = 1
|
numSubvolumes = 1
|
||||||
mySubvolume = 1
|
mySubvolume = 1
|
||||||
|
|
||||||
|
@ -75,9 +74,9 @@ class Sample:
|
||||||
minVoidRadius=0, fakeDensity=0.01, volumeLimited=True,
|
minVoidRadius=0, fakeDensity=0.01, volumeLimited=True,
|
||||||
includeInHubble=True, partOfCombo=False, isCombo=False,
|
includeInHubble=True, partOfCombo=False, isCombo=False,
|
||||||
comboList=(), profileBinSize=2.0, skyFraction=0.19,
|
comboList=(), profileBinSize=2.0, skyFraction=0.19,
|
||||||
dataType="observation", numSubDivisions=2,
|
|
||||||
boxLen=1024, usePecVel=False, omegaM=0.27,
|
boxLen=1024, usePecVel=False, omegaM=0.27,
|
||||||
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
|
numSubvolumes=1, mySubvolume=1, dataFormat="sdss",
|
||||||
|
dataType="observation",
|
||||||
subsample=1.0, useLightCone=True):
|
subsample=1.0, useLightCone=True):
|
||||||
self.dataFile = dataFile
|
self.dataFile = dataFile
|
||||||
self.fullName = fullName
|
self.fullName = fullName
|
||||||
|
@ -98,7 +97,6 @@ class Sample:
|
||||||
self.profileBinSize = profileBinSize
|
self.profileBinSize = profileBinSize
|
||||||
self.skyFraction = skyFraction
|
self.skyFraction = skyFraction
|
||||||
self.dataType = dataType
|
self.dataType = dataType
|
||||||
self.numSubDivisions = numSubDivisions
|
|
||||||
self.boxLen = boxLen
|
self.boxLen = boxLen
|
||||||
self.usePecVel = usePecVel
|
self.usePecVel = usePecVel
|
||||||
self.omegaM = omegaM
|
self.omegaM = omegaM
|
||||||
|
|
|
@ -166,7 +166,8 @@ def launchGenerate(sample, binPath, workDir=None, inputDataDir=None,
|
||||||
os.unlink(parmFile)
|
os.unlink(parmFile)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None):
|
def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None,
|
||||||
|
numZobovDivisions=None, numZobovThreads=None):
|
||||||
|
|
||||||
sampleName = sample.fullName
|
sampleName = sample.fullName
|
||||||
|
|
||||||
|
@ -197,11 +198,9 @@ def launchZobov(sample, binPath, zobovDir=None, logDir=None, continueRun=None):
|
||||||
if os.access(zobovDir+"/voidDesc_"+sampleName+".out", os.F_OK):
|
if os.access(zobovDir+"/voidDesc_"+sampleName+".out", os.F_OK):
|
||||||
os.unlink(zobovDir+"/voidDesc_"+sampleName+".out")
|
os.unlink(zobovDir+"/voidDesc_"+sampleName+".out")
|
||||||
|
|
||||||
numThreads = 2
|
|
||||||
|
|
||||||
cmd = "%s/vozinit %s 0.1 1.0 %g %s %g %s %s %s >& %s" % \
|
cmd = "%s/vozinit %s 0.1 1.0 %g %s %g %s %s %s >& %s" % \
|
||||||
(binPath, datafile, sample.numSubDivisions, \
|
(binPath, datafile, numZobovDivisions, \
|
||||||
"_"+sampleName, numThreads, \
|
"_"+sampleName, numZobovThreads, \
|
||||||
binPath, zobovDir, maskIndex, logFile)
|
binPath, zobovDir, maskIndex, logFile)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue