From a04d59b45bb01fd76141113babcaa34ce369a29a Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 22 Aug 2013 02:12:25 +0000 Subject: [PATCH] Port tests/lapack git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30401 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/CMakeLists.txt | 6 ++++-- tests/lapack/CMakeLists.txt | 1 + tests/lapack/Makefile | 10 ---------- tests/lapack/full_matrix_01.cc | 2 +- .../cmp/generic => full_matrix_01.output} | 0 tests/lapack/full_matrix_02.cc | 2 +- .../cmp/generic => full_matrix_02.output} | 0 tests/lapack/full_matrix_03.cc | 2 +- .../cmp/generic => full_matrix_03.output} | 0 tests/lapack/full_matrix_04.cc | 2 +- .../cmp/generic => full_matrix_04.output} | 0 .../full_matrix_04/full_matrix_03/cmp/generic | 20 ------------------- tests/lapack/full_matrix_05.cc | 2 +- .../cmp/generic => full_matrix_05.output} | 0 tests/lapack/full_matrix_06.cc | 2 +- .../cmp/generic => full_matrix_06.output} | 0 tests/lapack/full_matrix_07.cc | 2 +- .../cmp/generic => full_matrix_07.output} | 0 tests/lapack/solver_cg.cc | 2 +- .../cmp/generic => solver_cg.output} | 0 tests/lapack/tridiagonal_ev1.cc | 2 +- .../cmp/generic => tridiagonal_ev1.output} | 0 22 files changed, 14 insertions(+), 41 deletions(-) create mode 100644 tests/lapack/CMakeLists.txt delete mode 100644 tests/lapack/Makefile rename tests/lapack/{full_matrix_01/cmp/generic => full_matrix_01.output} (100%) rename tests/lapack/{full_matrix_02/cmp/generic => full_matrix_02.output} (100%) rename tests/lapack/{full_matrix_03/cmp/generic => full_matrix_03.output} (100%) rename tests/lapack/{full_matrix_04/cmp/generic => full_matrix_04.output} (100%) delete mode 100644 tests/lapack/full_matrix_04/full_matrix_03/cmp/generic rename tests/lapack/{full_matrix_05/cmp/generic => full_matrix_05.output} (100%) rename tests/lapack/{full_matrix_06/cmp/generic => full_matrix_06.output} (100%) rename tests/lapack/{full_matrix_07/cmp/generic => full_matrix_07.output} (100%) rename tests/lapack/{solver_cg/cmp/generic => solver_cg.output} (100%) rename tests/lapack/{tridiagonal_ev1/cmp/generic => tridiagonal_ev1.output} (100%) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 596c326afa..b8a7bc51f7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,7 +70,6 @@ MESSAGE(STATUS "Proceed to test definitions") #$(if $(USE_CONTRIB_PETSC:no=), petsc,) \ #$(if $(USE_CONTRIB_SLEPC:no=), slepc,) \ #$(if $(USE_CONTRIB_TRILINOS:no=), trilinos,) \ -#$(if $(USE_CONTRIB_LAPACK:no=), lapack,) #a-framework #all-headers @@ -86,7 +85,6 @@ ADD_SUBDIRECTORY(codim_one) #hp #integrators #lac -#lapack #lib #matrix_free #mesh_converter @@ -100,6 +98,10 @@ ADD_SUBDIRECTORY(multigrid) #slepc #trilinos +IF(DEAL_II_WITH_LAPACK) + ADD_SUBDIRECTORY(lapack) +ENDIF() + IF(DEAL_II_WITH_METIS) ADD_SUBDIRECTORY(metis) ENDIF() diff --git a/tests/lapack/CMakeLists.txt b/tests/lapack/CMakeLists.txt new file mode 100644 index 0000000000..0efb828f2c --- /dev/null +++ b/tests/lapack/CMakeLists.txt @@ -0,0 +1 @@ +DEAL_II_PICKUP_TESTS() diff --git a/tests/lapack/Makefile b/tests/lapack/Makefile deleted file mode 100644 index b945959c53..0000000000 --- a/tests/lapack/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -############################################################ -# $Id$ -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2010 by the deal.II authors -############################################################ - -include ../Makefile.paths -include $D/common/Make.global_options -include ../Makefile.rules --include Makefile.depend --include Makefile.tests diff --git a/tests/lapack/full_matrix_01.cc b/tests/lapack/full_matrix_01.cc index 304d4d476b..2384279791 100644 --- a/tests/lapack/full_matrix_01.cc +++ b/tests/lapack/full_matrix_01.cc @@ -98,7 +98,7 @@ void test_rect(unsigned int m, unsigned int n, const double *values) int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(3); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_01/cmp/generic b/tests/lapack/full_matrix_01.output similarity index 100% rename from tests/lapack/full_matrix_01/cmp/generic rename to tests/lapack/full_matrix_01.output diff --git a/tests/lapack/full_matrix_02.cc b/tests/lapack/full_matrix_02.cc index 016bb8d4e2..59371a93d8 100644 --- a/tests/lapack/full_matrix_02.cc +++ b/tests/lapack/full_matrix_02.cc @@ -79,7 +79,7 @@ test(const unsigned int size, const bool nonsymmetric) int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(3); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_02/cmp/generic b/tests/lapack/full_matrix_02.output similarity index 100% rename from tests/lapack/full_matrix_02/cmp/generic rename to tests/lapack/full_matrix_02.output diff --git a/tests/lapack/full_matrix_03.cc b/tests/lapack/full_matrix_03.cc index 22d70ad69b..35b55bedad 100644 --- a/tests/lapack/full_matrix_03.cc +++ b/tests/lapack/full_matrix_03.cc @@ -114,7 +114,7 @@ void test_rect(unsigned int m, unsigned int n, const double *values) int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(3); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_03/cmp/generic b/tests/lapack/full_matrix_03.output similarity index 100% rename from tests/lapack/full_matrix_03/cmp/generic rename to tests/lapack/full_matrix_03.output diff --git a/tests/lapack/full_matrix_04.cc b/tests/lapack/full_matrix_04.cc index 3ee7b22c89..00a818609d 100644 --- a/tests/lapack/full_matrix_04.cc +++ b/tests/lapack/full_matrix_04.cc @@ -116,7 +116,7 @@ void test_rect(unsigned int m, unsigned int n, const double *values) int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(3); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_04/cmp/generic b/tests/lapack/full_matrix_04.output similarity index 100% rename from tests/lapack/full_matrix_04/cmp/generic rename to tests/lapack/full_matrix_04.output diff --git a/tests/lapack/full_matrix_04/full_matrix_03/cmp/generic b/tests/lapack/full_matrix_04/full_matrix_03/cmp/generic deleted file mode 100644 index 57ea1fd12f..0000000000 --- a/tests/lapack/full_matrix_04/full_matrix_03/cmp/generic +++ /dev/null @@ -1,20 +0,0 @@ - -DEAL:4x4::Singular values 5.00000 5.00000 5.00000 1.00000 -DEAL:4x4::vmult ok -DEAL:4x4::vmult_add ok -DEAL:4x4::Tvmult ok -DEAL:4x4::Tvmult_add ok -DEAL:4x3::Singular values 16.0315 12.6623 6.13650 0 -DEAL:4x3::vmult ok -DEAL:4x3::vmult_add ok -DEAL:4x3::Tvmult ok -DEAL:4x3::Tvmult_add ok -DEAL:3x4::Singular values 20.7967 4.30713 1.98624 -DEAL:3x4::vmult ok -DEAL:3x4::vmult_add ok -DEAL:3x4::Tvmult ok -DEAL:3x4::Tvmult_add ok -DEAL::Eigenvalues 5 0 -DEAL::Eigenvalues 1 0 -DEAL::Eigenvalues 5 0 -DEAL::Eigenvalues 5 0 diff --git a/tests/lapack/full_matrix_05.cc b/tests/lapack/full_matrix_05.cc index 59f06f6e7a..c6cdbf1df4 100644 --- a/tests/lapack/full_matrix_05.cc +++ b/tests/lapack/full_matrix_05.cc @@ -47,7 +47,7 @@ const double right[] = int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(1); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_05/cmp/generic b/tests/lapack/full_matrix_05.output similarity index 100% rename from tests/lapack/full_matrix_05/cmp/generic rename to tests/lapack/full_matrix_05.output diff --git a/tests/lapack/full_matrix_06.cc b/tests/lapack/full_matrix_06.cc index 45adba318d..1c8720d8e8 100644 --- a/tests/lapack/full_matrix_06.cc +++ b/tests/lapack/full_matrix_06.cc @@ -48,7 +48,7 @@ const double right[] = int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(1); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_06/cmp/generic b/tests/lapack/full_matrix_06.output similarity index 100% rename from tests/lapack/full_matrix_06/cmp/generic rename to tests/lapack/full_matrix_06.output diff --git a/tests/lapack/full_matrix_07.cc b/tests/lapack/full_matrix_07.cc index ed20ae9b6b..5c5b489094 100644 --- a/tests/lapack/full_matrix_07.cc +++ b/tests/lapack/full_matrix_07.cc @@ -41,7 +41,7 @@ const double left[] = int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); logfile.precision(1); deallog.attach(logfile); diff --git a/tests/lapack/full_matrix_07/cmp/generic b/tests/lapack/full_matrix_07.output similarity index 100% rename from tests/lapack/full_matrix_07/cmp/generic rename to tests/lapack/full_matrix_07.output diff --git a/tests/lapack/solver_cg.cc b/tests/lapack/solver_cg.cc index 971484e1e7..3984e60207 100644 --- a/tests/lapack/solver_cg.cc +++ b/tests/lapack/solver_cg.cc @@ -68,7 +68,7 @@ check_Tsolve(SOLVER &solver, const MATRIX &A, int main() { - std::ofstream logfile("solver_cg/output"); + std::ofstream logfile("output"); // logfile.setf(std::ios::fixed); deallog << std::setprecision(4); deallog.attach(logfile); diff --git a/tests/lapack/solver_cg/cmp/generic b/tests/lapack/solver_cg.output similarity index 100% rename from tests/lapack/solver_cg/cmp/generic rename to tests/lapack/solver_cg.output diff --git a/tests/lapack/tridiagonal_ev1.cc b/tests/lapack/tridiagonal_ev1.cc index e3270b9e16..ee495b41c4 100644 --- a/tests/lapack/tridiagonal_ev1.cc +++ b/tests/lapack/tridiagonal_ev1.cc @@ -47,7 +47,7 @@ void test_laplacian(unsigned int n) int main() { - const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + const std::string logname = "output"; std::ofstream logfile(logname.c_str()); deallog.attach(logfile); deallog.depth_console(0); diff --git a/tests/lapack/tridiagonal_ev1/cmp/generic b/tests/lapack/tridiagonal_ev1.output similarity index 100% rename from tests/lapack/tridiagonal_ev1/cmp/generic rename to tests/lapack/tridiagonal_ev1.output -- 2.39.5