diff --git a/altar/bayesian/MPIAnnealing.py b/altar/bayesian/MPIAnnealing.py index 16372b2e..c8c3793b 100644 --- a/altar/bayesian/MPIAnnealing.py +++ b/altar/bayesian/MPIAnnealing.py @@ -114,14 +114,13 @@ def resample(self, annealer, statistics): accepted, rejected, unlikely = statistics # add up the acceptance/rejection statistics from all the nodes - accepted = self.communicator.sum(accepted, destination=manager) - rejected = self.communicator.sum(rejected, destination=manager) - unlikely = self.communicator.sum(unlikely, destination=manager) + # and distribute the results back to all processes + accepted = self.communicator.sum(item=accepted) + rejected = self.communicator.sum(item=rejected) + unlikely = self.communicator.sum(item=unlikely) - # if I am the boss - if self.rank == manager: - # chain up - super().resample(annealer=annealer, statistics=(accepted,rejected,unlikely)) + # chain up + super().resample(annealer=annealer, statistics=(accepted,rejected,unlikely)) # all done return self