MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / Bcast

Function Bcast

Src/Base/AMReX_ParallelDescriptor.cpp:1139–1159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137}
1138
1139void
1140Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
1141{
1142#ifdef BL_LAZY
1143 int r;
1144 MPI_Comm_compare(comm, Communicator(), &r);
1145 if (r == MPI_IDENT) { Lazy::EvalReduction(); }
1146#endif
1147
1148 BL_PROFILE_S("ParallelDescriptor::Bcast(viMiM)");
1149 BL_COMM_PROFILE(BLProfiler::BCastTsi, BLProfiler::BeforeCall(), root, BLProfiler::NoTag());
1150
1151 BL_MPI_REQUIRE( MPI_Bcast(buf,
1152 count,
1153 datatype,
1154 root,
1155 comm) );
1156 int tsize(0);
1157 BL_MPI_REQUIRE( MPI_Type_size(datatype, &tsize) );
1158 BL_COMM_PROFILE(BLProfiler::BCastTsi, count * tsize, root, BLProfiler::NoTag());
1159}
1160
1161
1162#else /*!BL_USE_MPI*/

Callers 2

ReadAndBcastFileFunction · 0.70
amrex_fi_pd_bcast_rFunction · 0.70

Calls 2

CommunicatorFunction · 0.85
EvalReductionFunction · 0.85

Tested by

no test coverage detected