ScaLAPACKMatrix<NumberType>::copy_from(const LAPACKFullMatrix<NumberType> &B,
const unsigned int rank)
{
-# if DEAL_II_MPI_VERSION_GTE(3, 0)
if (n_rows * n_columns == 0)
return;
const unsigned int this_mpi_process(
Utilities::MPI::this_mpi_process(this->grid->mpi_communicator));
-# ifdef DEBUG
+# ifdef DEBUG
Assert(Utilities::MPI::max(rank, this->grid->mpi_communicator) == rank,
ExcMessage("All processes have to call routine with identical rank"));
Assert(Utilities::MPI::min(rank, this->grid->mpi_communicator) == rank,
ExcMessage("All processes have to call routine with identical rank"));
-# endif
+# endif
// root process has to be active in the grid of A
if (this_mpi_process == rank)
const int n = 1;
const std::vector<int> ranks(n, rank);
MPI_Group group_B;
- MPI_Group_incl(group_A, n, ranks.data(), &group_B);
+ MPI_Group_incl(group_A, n, DEAL_II_MPI_CONST_CAST(ranks.data()), &group_B);
MPI_Comm communicator_B;
- MPI_Comm_create_group(this->grid->mpi_communicator,
- group_B,
- 0,
- &communicator_B);
+ Utilities::MPI::create_group(this->grid->mpi_communicator,
+ group_B,
+ 0,
+ &communicator_B);
int n_proc_rows_B = 1, n_proc_cols_B = 1;
int this_process_row_B = -1, this_process_column_B = -1;
int blacs_context_B = -1;
MPI_Comm_free(&communicator_B);
state = LAPACKSupport::matrix;
-# else
- (void)B;
- (void)rank;
- AssertThrow(false, ExcNotImplemented());
-# endif
}
ScaLAPACKMatrix<NumberType>::copy_to(LAPACKFullMatrix<NumberType> &B,
const unsigned int rank) const
{
-# if DEAL_II_MPI_VERSION_GTE(3, 0)
if (n_rows * n_columns == 0)
return;
const unsigned int this_mpi_process(
Utilities::MPI::this_mpi_process(this->grid->mpi_communicator));
-# ifdef DEBUG
+# ifdef DEBUG
Assert(Utilities::MPI::max(rank, this->grid->mpi_communicator) == rank,
ExcMessage("All processes have to call routine with identical rank"));
Assert(Utilities::MPI::min(rank, this->grid->mpi_communicator) == rank,
ExcMessage("All processes have to call routine with identical rank"));
-# endif
+# endif
if (this_mpi_process == rank)
{
const int n = 1;
const std::vector<int> ranks(n, rank);
MPI_Group group_B;
- MPI_Group_incl(group_A, n, ranks.data(), &group_B);
+ MPI_Group_incl(group_A, n, DEAL_II_MPI_CONST_CAST(ranks.data()), &group_B);
MPI_Comm communicator_B;
- MPI_Comm_create_group(this->grid->mpi_communicator,
- group_B,
- 0,
- &communicator_B);
+ Utilities::MPI::create_group(this->grid->mpi_communicator,
+ group_B,
+ 0,
+ &communicator_B);
int n_proc_rows_B = 1, n_proc_cols_B = 1;
int this_process_row_B = -1, this_process_column_B = -1;
int blacs_context_B = -1;
MPI_Group_free(&group_B);
if (MPI_COMM_NULL != communicator_B)
MPI_Comm_free(&communicator_B);
-# else
- (void)B;
- (void)rank;
- AssertThrow(false, ExcNotImplemented());
-# endif
}