diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index c6d8d3dc2d749a04d3531fa3249e444f6172d4d4..2a71994db582a5c2ae9ef4df508a429f611b5e24 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -892,6 +892,9 @@ class Population: self.process_ID: persistent_data_memaddr } + # lets try out making stores for all the grids: + self.grid_options["_store_memaddr"] = _binary_c_bindings.return_store_memaddr() + # apparently we have to re-load this for every process, otherwise NameErrors arise (seems like a bug but I'm not sure) self._load_grid_function() @@ -911,7 +914,7 @@ class Population: ) verbose_print( - "Process {} started at {}".format(ID, datetime.datetime.now().isoformat()), self.grid_options["verbosity"], 0 + "Process {} started at {}. Using store memaddr {}".format(ID, datetime.datetime.now().isoformat(), self.grid_options["_store_memaddr"]), self.grid_options["verbosity"], 0 ) round_number_mod = 0 @@ -1005,6 +1008,10 @@ class Population: with open(output_file, "w") as f: f.write(ensemble_raw_output) + # free store mem: + _binary_c_bindings.free_store_memaddr(self.grid_options["_store_memaddr"]) + + # Return a set of results and errors output_dict = { "results": self.grid_options["results"],