Skip to content

Commit

Permalink
static cast on MPI to ensure correct mem address
Browse files Browse the repository at this point in the history
  • Loading branch information
jpollin98 committed Apr 25, 2024
1 parent 9f405f8 commit bbfffe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions radfield.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,8 @@ void do_MPI_Bcast(const int modelgridindex, const int root, int root_node_id)

if constexpr (DETAILED_BF_ESTIMATORS_ON) {
if (globals::rank_in_node == 0) {
MPI_Bcast(&prev_bfrate_normed[nonemptymgi * globals::bfestimcount], globals::bfestimcount, MPI_FLOAT,
root_node_id, globals::mpi_comm_internode);
MPI_Bcast(&prev_bfrate_normed[static_cast<size_t>(nonemptymgi) * static_cast<size_t>(globals::bfestimcount)],
globals::bfestimcount, MPI_FLOAT, root_node_id, globals::mpi_comm_internode);
}
}

Expand Down

0 comments on commit bbfffe3

Please sign in to comment.