We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when I write code to reduce a bool:
bool my_result = false; bool reduced_result = boost::mpi::all_reduce(comm, my_result, logical_and<>());
I found that the std::logical_and<bool> is not considered a boost::mpi::is_mpi_op:
std::logical_and<bool>
boost::mpi::is_mpi_op
static_assert(boost::mpi::is_mpi_op<std::logical_and<bool>, bool>()); // Static assertion failed
further read the code I found that
static_assert(boost::mpi::is_mpi_datatype<bool>()); // OK static_assert(boost::mpi::is_mpi_logical_datatype<bool>()); // Static assertion failed
this caused the boost::mpi to use a all_reduce_impl with (tiny) overhead.
all_reduce_impl
The text was updated successfully, but these errors were encountered:
for bool and std::logical_and, the MPI_C_BOOL and MPI_LAND should be used in reduction, instead of using a all_reduce_impl that creats a new user_op.
MPI_C_BOOL
MPI_LAND
user_op
Sorry, something went wrong.
aminiussi
No branches or pull requests
Problem
when I write code to reduce a bool:
I found that the
std::logical_and<bool>
is not considered aboost::mpi::is_mpi_op
:further read the code I found that
this caused the boost::mpi to use a
all_reduce_impl
with (tiny) overhead.The text was updated successfully, but these errors were encountered: