| 1137 | } |
| 1138 | |
| 1139 | void |
| 1140 | Bcast(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*/ |
no test coverage detected