Fix completed condition in run_experiments
@@ -716,12 +716,12 @@ class ExperimentBuilder(object):
# Cycle between experiments every switch_experiment_interval iterations
# until all of them are done.
- completed = [False] # This is just to run the first iteration.
+ completed = [False for _ in range(len(all_experiments))]
while not all(completed):
# Distribute experiments across MPI communicators if requested
if processes_per_experiment is None:
- for exp in all_experiments:
- self._run_experiment(exp)
+ for exp_index, exp in enumerate(all_experiments):
+ completed[exp_index] = self._run_experiment(exp)
else:
completed, experiment_indices = mpi.distribute(self._run_experiment,
distributed_args=all_experiments,
