Commit 73cab275 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

compute default number of checkpoints per file

assume each checkpoint file should be at least order 1GB, and then check
how much space each checkpoint will require.
this includes both field and particle data.
parent 4ed852f4
......@@ -655,6 +655,21 @@ class DNS(_code):
opt.dky = 2. / opt.Ly
if type(opt.dkx) == type(None):
opt.dkz = 2. / opt.Lz
if type(opt.nx) == type(None):
opt.nx = opt.n
if type(opt.ny) == type(None):
opt.ny = opt.n
if type( == type(None): = opt.n
if type(opt.checkpoints_per_file) == type(None):
# hardcoded FFTW complex representation size
field_size = 3*(opt.nx+2)*opt.ny**self.fluid_dtype.itemsize
checkpoint_size = field_size
if self.dns_type == 'NSVEp':
particle_size = (1+opt.tracers0_integration_steps)*3*opt.nparticles*8
checkpoint_size += particle_size
if checkpoint_size < 1e9:
opt.checkpoints_per_file = int(1e9 / checkpoint_size)
return opt
def launch(
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment