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

Fix compute_prefix_sum() for serial run #16139

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/deal.II/lac/sparse_matrix_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ namespace SparseMatrixTools
(void)comm;
return {0, value};
# else
if (comm == MPI_COMM_SELF)
return {0, value}; // serial triangulation
Comment on lines +154 to +155
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right tests. You want to check whether the communicator has one process attached. It doesn't have to be MPI_COMM_SELF -- it could be MPI_COMM_WORLD or a sub-communicator, as long as it's only got one process. I think it would be better to test Utilities::MPI::n_mpi_processes(comm)==1 here.

Separately, the comment is not useful. There is no triangulation available in this function.


T prefix = {};

int ierr =
Expand Down