Skip to content
Snippets Groups Projects
Commit b198c6cb authored by David Hendriks's avatar David Hendriks
Browse files

added store memaddr per thread

parent 81622d4f
No related branches found
No related tags found
No related merge requests found
...@@ -892,6 +892,9 @@ class Population: ...@@ -892,6 +892,9 @@ class Population:
self.process_ID: persistent_data_memaddr 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) # 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() self._load_grid_function()
...@@ -911,7 +914,7 @@ class Population: ...@@ -911,7 +914,7 @@ class Population:
) )
verbose_print( 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 round_number_mod = 0
...@@ -1005,6 +1008,10 @@ class Population: ...@@ -1005,6 +1008,10 @@ class Population:
with open(output_file, "w") as f: with open(output_file, "w") as f:
f.write(ensemble_raw_output) 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 # Return a set of results and errors
output_dict = { output_dict = {
"results": self.grid_options["results"], "results": self.grid_options["results"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment