Skip to content
Snippets Groups Projects
Commit 0ce7d47f authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

fix checkpoint postprocessing issue

parent 0ef93327
No related branches found
No related tags found
1 merge request!23WIP: Feature/use cmake
Pipeline #
...@@ -773,7 +773,7 @@ class PP(_code): ...@@ -773,7 +773,7 @@ class PP(_code):
dtype = np.float64) dtype = np.float64)
df.close() df.close()
return None return None
def prepare_field_file(self): def prepare_field_file(self, iter0 = 0):
df = self.get_data_file() df = self.get_data_file()
if 'field_dtype' in df.keys(): if 'field_dtype' in df.keys():
# we don't need to do anything, raw binary files are used # we don't need to do anything, raw binary files are used
...@@ -784,7 +784,7 @@ class PP(_code): ...@@ -784,7 +784,7 @@ class PP(_code):
with h5py.File(os.path.join(self.work_dir, self.simname + '_fields.h5'), 'a') as ff: with h5py.File(os.path.join(self.work_dir, self.simname + '_fields.h5'), 'a') as ff:
ff.require_group('vorticity') ff.require_group('vorticity')
ff.require_group('vorticity/complex') ff.require_group('vorticity/complex')
checkpoint = 0 checkpoint = (iter0 // niter_out) // cppf
while True: while True:
cpf_name = os.path.join( cpf_name = os.path.join(
self.work_dir, self.work_dir,
...@@ -805,7 +805,7 @@ class PP(_code): ...@@ -805,7 +805,7 @@ class PP(_code):
opt = None, opt = None,
particle_initial_condition = None): particle_initial_condition = None):
self.prepare_post_file(opt) self.prepare_post_file(opt)
self.prepare_field_file() self.prepare_field_file(iter0 = opt.iter0)
self.run( self.run(
nb_processes = opt.nb_processes, nb_processes = opt.nb_processes,
nb_threads_per_process = opt.nb_threads_per_process, nb_threads_per_process = opt.nb_threads_per_process,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment