From ad565424902f74042aca784bd751568d0d9a1be1 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt <mikael@djurfeldt.com> Date: Tue, 19 Jul 2022 20:48:50 +0200 Subject: [PATCH] Further C++ to C call conversions --- src/multibuffer.cc | 12 ++++++------ utils/music.cc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/multibuffer.cc b/src/multibuffer.cc index 334ef62..13df2c1 100644 --- a/src/multibuffer.cc +++ b/src/multibuffer.cc @@ -207,8 +207,7 @@ namespace MUSIC { for (Blocks::iterator b = block_.begin (); b != block_.end (); ++b) start = std::max (start, b->headerSize ()); - MPI::COMM_WORLD.Allreduce (MPI::IN_PLACE, &start, 1, MPI::UNSIGNED, - MPI::MAX); + MPI_Allreduce (MPI_IN_PLACE, &start, 1, MPI_UNSIGNED, MPI_MAX, MPI_COMM_WORLD); errorBlockSize_ = start; @@ -255,10 +254,11 @@ namespace MUSIC { int worldRank = mpi_get_rank (MPI_COMM_WORLD); std::vector<RankInfo> rankInfos (worldSize); rankInfos[worldRank] = RankInfo (localLeader_, localRank); - MPI::COMM_WORLD.Allgather (MPI::IN_PLACE, 0, MPI::DATATYPE_NULL, - &rankInfos.front (), - sizeof (RankInfo) / sizeof (int), - MPI_INT); + MPI_Allgather (MPI_IN_PLACE, 0, MPI_DATATYPE_NULL, + &rankInfos.front (), + sizeof (RankInfo) / sizeof (int), + MPI_INT, + MPI_COMM_WORLD); for (int wr = 0; wr < worldSize; ++wr) { RankInfo& ri = rankInfos[wr]; diff --git a/utils/music.cc b/utils/music.cc index 8399c6c..12ab5cb 100644 --- a/utils/music.cc +++ b/utils/music.cc @@ -167,7 +167,7 @@ launch (MUSIC::Configuration* config, char** argv) int main (int argc, char *argv[]) { - // predict the rank MPI::Init will give us using + // predict the rank MPI_Init will give us using // mpi implementation dependent code from ../mpidep int rank = -1; #if MUSIC_USE_MPI -- GitLab