Commit b198c6cb authored by David Hendriks's avatar David Hendriks
Browse files

added store memaddr per thread

parent 81622d4f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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"],