22#ifndef INCLUDE_UTILITIES_MPI_H_
23#define INCLUDE_UTILITIES_MPI_H_
33std::tuple<bool, unsigned int>
34identify_first_process_on_node(MPI_Comm
const & mpi_comm)
37 MPI_Comm_rank(mpi_comm, &rank);
40 MPI_Comm_split_type(mpi_comm, MPI_COMM_TYPE_SHARED, rank, MPI_INFO_NULL, &comm_shared);
43 MPI_Comm_size(comm_shared, &size_shared);
44 MPI_Comm_free(&comm_shared);
46 AssertThrow(size_shared == dealii::Utilities::MPI::max(size_shared, mpi_comm),
48 "The identification of MPI process groups in terms of compute nodes only "
49 "works if all nodes are populated with the same number of MPI ranks!"));
50 return {rank % size_shared == 0, size_shared};