From 3ae9b8c7f0c90fc5f1b3b1c3bc87381891c0019f Mon Sep 17 00:00:00 2001 From: darndt Date: Tue, 5 Dec 2017 17:55:27 +0100 Subject: [PATCH] Fix more warning regarding signed/unsigned comparison --- source/base/process_grid.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/base/process_grid.cc b/source/base/process_grid.cc index 4727265fd0..4f05f91c11 100644 --- a/source/base/process_grid.cc +++ b/source/base/process_grid.cc @@ -143,12 +143,14 @@ namespace Utilities // Create an auxiliary communicator which has root and all inactive cores. // Assume that inactive cores start with id=n_process_rows*n_process_columns - Assert (mpi_process_is_active || this_mpi_process >= n_process_rows*n_process_columns, + const unsigned int n_active_mpi_processes = n_process_rows*n_process_columns; + Assert (mpi_process_is_active || + this_mpi_process >= n_active_mpi_processes, ExcInternalError()); std::vector inactive_with_root_ranks; inactive_with_root_ranks.push_back(0); - for (int i = n_process_rows*n_process_columns; i < n_mpi_processes; ++i) + for (unsigned int i = n_active_mpi_processes; i < n_mpi_processes; ++i) inactive_with_root_ranks.push_back(i); // Get the group of processes in mpi_communicator -- 2.39.5