Skip to content

Commit 01a2539

Browse files
committed
Fix wrong MPI_COMM_WORLD
1 parent b70a46f commit 01a2539

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/auxiliary/Mpi.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ StringMatrix collectStringsAsMatrixTo(
4949
1,
5050
MPI_INT,
5151
destRank,
52-
MPI_COMM_WORLD);
52+
communicator);
5353
int maxLength = std::accumulate(
5454
recvcounts.begin(), recvcounts.end(), 0, [](int a, int b) {
5555
return std::max(a, b);
@@ -78,7 +78,7 @@ StringMatrix collectStringsAsMatrixTo(
7878
displs.data(),
7979
MPI_CHAR,
8080
destRank,
81-
MPI_COMM_WORLD);
81+
communicator);
8282

8383
return res;
8484
}
@@ -95,7 +95,7 @@ std::vector<std::string> distributeStringsToAllRanks(
9595
int *displs = new int[size];
9696

9797
MPI_Allgather(
98-
&sendLength, 1, MPI_INT, sizesBuffer, 1, MPI_INT, MPI_COMM_WORLD);
98+
&sendLength, 1, MPI_INT, sizesBuffer, 1, MPI_INT, communicator);
9999

100100
char *namesBuffer;
101101
{
@@ -116,7 +116,7 @@ std::vector<std::string> distributeStringsToAllRanks(
116116
sizesBuffer,
117117
displs,
118118
MPI_CHAR,
119-
MPI_COMM_WORLD);
119+
communicator);
120120

121121
std::vector<std::string> hostnames(size);
122122
for (int i = 0; i < size; ++i)

0 commit comments

Comments
 (0)