From 0e9c4c2ed161e84fff46535b6819f454f3199e08 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 26 Mar 2017 22:35:56 +0200 Subject: [PATCH] fix matrix-free unit tests --- tests/matrix_free/copy.cc | 2 +- tests/matrix_free/copy_feevaluation.cc | 3 +-- tests/matrix_free/get_functions_multife.cc | 4 +--- tests/matrix_free/get_functions_multife2.cc | 4 +--- tests/matrix_free/integrate_functions.cc | 2 +- tests/matrix_free/integrate_functions_multife.cc | 2 +- tests/matrix_free/integrate_functions_multife2.cc | 3 +-- tests/matrix_free/matrix_vector_20.cc | 1 - tests/matrix_free/matrix_vector_21.cc | 1 - tests/matrix_free/matrix_vector_curl.cc | 3 +-- tests/matrix_free/matrix_vector_div.cc | 4 +--- tests/matrix_free/matrix_vector_stokes.cc | 4 +--- tests/matrix_free/matrix_vector_stokes_base.cc | 3 +-- tests/matrix_free/matrix_vector_stokes_noflux.cc | 3 +-- tests/matrix_free/matrix_vector_stokes_notempl.cc | 3 +-- tests/matrix_free/matrix_vector_stokes_qdg0.cc | 4 +--- tests/matrix_free/matrix_vector_stokes_qdg0b.cc | 3 +-- tests/matrix_free/thread_correctness.cc | 8 +++----- 18 files changed, 18 insertions(+), 39 deletions(-) diff --git a/tests/matrix_free/copy.cc b/tests/matrix_free/copy.cc index d023271585..6d8487f86c 100644 --- a/tests/matrix_free/copy.cc +++ b/tests/matrix_free/copy.cc @@ -80,7 +80,7 @@ void sub_test() { const QGauss<1> quad (fe_degree+1); mf_data.reinit (dof, constraints, quad, - typename MatrixFree::AdditionalData(MPI_COMM_SELF,MatrixFree::AdditionalData::none)); + typename MatrixFree::AdditionalData(MatrixFree::AdditionalData::none)); } MatrixFreeTest mf_ref (mf_data); diff --git a/tests/matrix_free/copy_feevaluation.cc b/tests/matrix_free/copy_feevaluation.cc index 6f724c263d..461b7348b6 100644 --- a/tests/matrix_free/copy_feevaluation.cc +++ b/tests/matrix_free/copy_feevaluation.cc @@ -313,8 +313,7 @@ void test () // no parallelism mf_data.reinit (mapping, dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/get_functions_multife.cc b/tests/matrix_free/get_functions_multife.cc index 5c2154f55a..f44fd238f6 100644 --- a/tests/matrix_free/get_functions_multife.cc +++ b/tests/matrix_free/get_functions_multife.cc @@ -262,8 +262,7 @@ void test () quad.push_back(QGauss<1>(fe_degree+1+no)); mf_data.reinit (dof, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_SELF, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } MatrixFreeTest mf (mf_data); @@ -295,4 +294,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/get_functions_multife2.cc b/tests/matrix_free/get_functions_multife2.cc index 4f333ae861..848273cdb9 100644 --- a/tests/matrix_free/get_functions_multife2.cc +++ b/tests/matrix_free/get_functions_multife2.cc @@ -314,8 +314,7 @@ void test () quad.push_back (QGauss<1>(fe_degree+1)); mf_data.reinit (dof, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_SELF, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } MatrixFreeTest mf (mf_data); @@ -347,4 +346,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/integrate_functions.cc b/tests/matrix_free/integrate_functions.cc index 753984e3c5..89d9afb9ff 100644 --- a/tests/matrix_free/integrate_functions.cc +++ b/tests/matrix_free/integrate_functions.cc @@ -198,7 +198,7 @@ void test () { const QGauss<1> quad (fe_degree+1); mf_data.reinit (dof, constraints, quad, - typename MatrixFree::AdditionalData(MPI_COMM_SELF,MatrixFree::AdditionalData::none)); + typename MatrixFree::AdditionalData(MatrixFree::AdditionalData::none)); } MatrixFreeTest mf (mf_data); diff --git a/tests/matrix_free/integrate_functions_multife.cc b/tests/matrix_free/integrate_functions_multife.cc index eaca2a4dfb..fd13063f19 100644 --- a/tests/matrix_free/integrate_functions_multife.cc +++ b/tests/matrix_free/integrate_functions_multife.cc @@ -307,7 +307,7 @@ void test () for (unsigned int no=0; no<2; ++no) quad.push_back(QGauss<1>(fe_degree+1+no)); mf_data.reinit (dof, constraints, quad, - typename MatrixFree::AdditionalData(MPI_COMM_SELF,MatrixFree::AdditionalData::none)); + typename MatrixFree::AdditionalData(MatrixFree::AdditionalData::none)); } MatrixFreeTest mf (mf_data); diff --git a/tests/matrix_free/integrate_functions_multife2.cc b/tests/matrix_free/integrate_functions_multife2.cc index f441096cfb..fd712020b1 100644 --- a/tests/matrix_free/integrate_functions_multife2.cc +++ b/tests/matrix_free/integrate_functions_multife2.cc @@ -298,7 +298,7 @@ void test () quad.push_back (QGauss<1>(1)); quad.push_back (QGauss<1>(fe_degree+1)); mf_data.reinit (dof, constraints, quad, - typename MatrixFree::AdditionalData(MPI_COMM_SELF,MatrixFree::AdditionalData::none)); + typename MatrixFree::AdditionalData(MatrixFree::AdditionalData::none)); } MatrixFreeTest mf (mf_data); @@ -351,4 +351,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/matrix_vector_20.cc b/tests/matrix_free/matrix_vector_20.cc index 0852450373..5883845c97 100644 --- a/tests/matrix_free/matrix_vector_20.cc +++ b/tests/matrix_free/matrix_vector_20.cc @@ -168,7 +168,6 @@ void test () { const QGauss<1> quad (fe_degree+1); typename MatrixFree::AdditionalData data; - data.mpi_communicator = MPI_COMM_WORLD; data.tasks_parallel_scheme = MatrixFree::AdditionalData::partition_color; data.tasks_block_size = 7; diff --git a/tests/matrix_free/matrix_vector_21.cc b/tests/matrix_free/matrix_vector_21.cc index 51867f9bfb..021b9e8798 100644 --- a/tests/matrix_free/matrix_vector_21.cc +++ b/tests/matrix_free/matrix_vector_21.cc @@ -159,7 +159,6 @@ void test () { const QGauss<1> quad (fe_degree+1); typename MatrixFree::AdditionalData data; - data.mpi_communicator = MPI_COMM_WORLD; data.tasks_parallel_scheme = MatrixFree::AdditionalData::partition_color; data.tasks_block_size = 7; diff --git a/tests/matrix_free/matrix_vector_curl.cc b/tests/matrix_free/matrix_vector_curl.cc index a465ed80a0..ccb452396f 100644 --- a/tests/matrix_free/matrix_vector_curl.cc +++ b/tests/matrix_free/matrix_vector_curl.cc @@ -255,8 +255,7 @@ void test () QGauss<1> quad(fe_degree+1); mf_data.reinit (dof_handler_sca, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/matrix_vector_div.cc b/tests/matrix_free/matrix_vector_div.cc index 31ed6bf555..a5380eb612 100644 --- a/tests/matrix_free/matrix_vector_div.cc +++ b/tests/matrix_free/matrix_vector_div.cc @@ -254,8 +254,7 @@ void test () QGauss<1> quad(fe_degree+1); mf_data.reinit (dof_handler_sca, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); @@ -295,4 +294,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/matrix_vector_stokes.cc b/tests/matrix_free/matrix_vector_stokes.cc index bbe7eef4c3..5cb39ac9ff 100644 --- a/tests/matrix_free/matrix_vector_stokes.cc +++ b/tests/matrix_free/matrix_vector_stokes.cc @@ -284,8 +284,7 @@ void test () QGauss<1> quad(fe_degree+2); mf_data.reinit (dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); @@ -327,4 +326,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/matrix_vector_stokes_base.cc b/tests/matrix_free/matrix_vector_stokes_base.cc index 26ed95f6b3..8e8eaf60ab 100644 --- a/tests/matrix_free/matrix_vector_stokes_base.cc +++ b/tests/matrix_free/matrix_vector_stokes_base.cc @@ -255,8 +255,7 @@ test() // no parallelism mf_data->reinit (dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/matrix_vector_stokes_noflux.cc b/tests/matrix_free/matrix_vector_stokes_noflux.cc index dcd2e5fb6e..7e1fa4fa17 100644 --- a/tests/matrix_free/matrix_vector_stokes_noflux.cc +++ b/tests/matrix_free/matrix_vector_stokes_noflux.cc @@ -310,8 +310,7 @@ void test () // no parallelism mf_data.reinit (mapping, dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/matrix_vector_stokes_notempl.cc b/tests/matrix_free/matrix_vector_stokes_notempl.cc index 0e17648af1..ce8500dbe4 100644 --- a/tests/matrix_free/matrix_vector_stokes_notempl.cc +++ b/tests/matrix_free/matrix_vector_stokes_notempl.cc @@ -307,8 +307,7 @@ void test (const unsigned int fe_degree) // no parallelism mf_data.reinit (mapping, dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/matrix_vector_stokes_qdg0.cc b/tests/matrix_free/matrix_vector_stokes_qdg0.cc index d021a47b41..4f7cde1204 100644 --- a/tests/matrix_free/matrix_vector_stokes_qdg0.cc +++ b/tests/matrix_free/matrix_vector_stokes_qdg0.cc @@ -286,8 +286,7 @@ void test () QGauss<1> quad(fe_degree+2); mf_data.reinit (dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); @@ -328,4 +327,3 @@ int main () deallog.pop(); } } - diff --git a/tests/matrix_free/matrix_vector_stokes_qdg0b.cc b/tests/matrix_free/matrix_vector_stokes_qdg0b.cc index ec5facf373..f8290a1016 100644 --- a/tests/matrix_free/matrix_vector_stokes_qdg0b.cc +++ b/tests/matrix_free/matrix_vector_stokes_qdg0b.cc @@ -287,8 +287,7 @@ void test (const unsigned int fe_degree) QGauss<1> quad(fe_degree+2); mf_data.reinit (dofs, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_WORLD, - MatrixFree::AdditionalData::none)); + (MatrixFree::AdditionalData::none)); } system_matrix.vmult (solution, system_rhs); diff --git a/tests/matrix_free/thread_correctness.cc b/tests/matrix_free/thread_correctness.cc index b04c47e4f1..8030d11ff7 100644 --- a/tests/matrix_free/thread_correctness.cc +++ b/tests/matrix_free/thread_correctness.cc @@ -83,20 +83,18 @@ void sub_test() { const QGauss<1> quad (fe_degree+1); mf_data.reinit (dof, constraints, quad, - typename MatrixFree::AdditionalData(MPI_COMM_SELF,MatrixFree::AdditionalData::none)); + typename MatrixFree::AdditionalData(MatrixFree::AdditionalData::none)); // choose block size of 3 which introduces // some irregularity to the blocks (stress the // non-overlapping computation harder) mf_data_color.reinit (dof, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_SELF, - MatrixFree::AdditionalData::partition_color, + (MatrixFree::AdditionalData::partition_color, 3)); mf_data_partition.reinit (dof, constraints, quad, typename MatrixFree::AdditionalData - (MPI_COMM_SELF, - MatrixFree::AdditionalData::partition_partition, + (MatrixFree::AdditionalData::partition_partition, 3)); } -- 2.39.5