Skip to content

Commit

Permalink
Merge pull request #1298 from JasonRuonanWang/add-mpi-allreduce
Browse files Browse the repository at this point in the history
added MPI_Allreduce in mpidummy
  • Loading branch information
JasonRuonanWang authored Mar 16, 2019
2 parents 163a81d + 12e4b91 commit d17b219
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/adios2/helper/mpidummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@ int MPI_Reduce(const void *sendbuf, void *recvbuf, int count,
return 0;
}

int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
{
return MPI_Reduce(sendbuf, recvbuf, count, datatype, op, 0, comm);
}

} // end namespace mpi
} // end namespace helper
} // end namespace adios2
3 changes: 3 additions & 0 deletions source/adios2/helper/mpidummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ double MPI_Wtime();
int MPI_Reduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);

int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);

} // end namespace mpi
} // end namespace helper
} // end namespace adios
Expand Down

0 comments on commit d17b219

Please sign in to comment.