Skip to content
New issue

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

Modified is_true_somewhere function to use integers instead of bools.… #102

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/functionality/toml_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ void fmt_comment(std::ostream &summary, int col_width, std::string key,
}

bool is_true_somewhere(bool flag, MPI_Comm comm) {
int in, out;
bool ret;
int err = MPI_Allreduce(&flag, &ret, 1, MPI_CXX_BOOL, MPI_LOR, comm);
flag ? in = 1 : in = 0;
int err = MPI_Allreduce(&in, &out, 1, MPI_INT, MPI_SUM, comm);
if (err != MPI_SUCCESS) {
throw ExaGOError("Error in is_true_somewhere for MPI_Allreduce");
}
out == 0 ? ret = false : ret = true;
return ret;
}

Expand Down