diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index cd379cab9ffb24e39d4e13179042e513683266a2..6c02274d0475d7fa4bce226cfde3672209cedada 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -911,8 +911,12 @@ class Population: "Process {} started at {}".format(ID, datetime.datetime.now().isoformat()), self.grid_options["verbosity"], 0 ) + round_number_mod = 0 + # Go over the generator while running: + # round_number_mod = (localcounter+1)%self.grid_options["amt_cores"] + try: # Get the system system = next(generator) @@ -948,9 +952,13 @@ class Population: except StopIteration: running = False + if (localcounter+1)%self.grid_options["amt_cores"]==0: + round_number_mod += 1 + # round_number_mod = (localcounter+1)%self.grid_options["amt_cores"] + # print("thread {} round_nr_mod {}. localcounter {}".format(ID, round_number_mod, localcounter)) + # Has to be here because this one is used for the (localcounter+ID) % (self..) localcounter += 1 - round_number_mod = (localcounter+1)%self.grid_options["amt_cores"] # Handle ensemble output: is ensemble==1, then either directly write that data to a file, or combine everything into 1 file. ensemble_json = {} # Make sure it exists already