Skip to content
Snippets Groups Projects
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
Branches
Tags
1 merge request!21Bugfix/nansampling
...@@ -655,6 +655,21 @@ class DNS(_code): ...@@ -655,6 +655,21 @@ class DNS(_code):
opt.dky = 2. / opt.Ly opt.dky = 2. / opt.Ly
if type(opt.dkx) == type(None): if type(opt.dkx) == type(None):
opt.dkz = 2. / opt.Lz 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(opt.nz) == type(None):
opt.nz = opt.n
if type(opt.checkpoints_per_file) == type(None):
# hardcoded FFTW complex representation size
field_size = 3*(opt.nx+2)*opt.ny*opt.nz*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)
self.pars_from_namespace(opt) self.pars_from_namespace(opt)
return opt return opt
def launch( def launch(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment