diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e43ec59d..8230c219ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#876](https://github.com/helmholtz-analytics/heat/pull/876) Make examples work (Lasso and kNN) - [#894](https://github.com/helmholtz-analytics/heat/pull/894) Change inclusion of license file - [#884](https://github.com/helmholtz-analytics/heat/pull/884) Added capabilities for PyTorch 1.10.0, this is now the recommended version to use. +- [#940](https://github.com/helmholtz-analytics/heat/pull/940) Duplicate MPI_COMM_WORLD to make library more independent. - [#941](https://github.com/helmholtz-analytics/heat/pull/941) Add function to save data as CSV. ## Bug Fixes diff --git a/heat/core/communication.py b/heat/core/communication.py index 7d9abfbc6f..e93b12bf1c 100644 --- a/heat/core/communication.py +++ b/heat/core/communication.py @@ -1883,7 +1883,11 @@ def __getattr__(self, name: str): return getattr(self.handle, name) -MPI_WORLD = MPICommunication() +# creating a duplicate COMM +comm = MPI.COMM_WORLD +dup_comm = comm.Dup() + +MPI_WORLD = MPICommunication(dup_comm) MPI_SELF = MPICommunication(MPI.COMM_SELF) # set the default communicator to be MPI_WORLD