From 69d4dcbc70ba9da5998f8b646605def2fd0b3474 Mon Sep 17 00:00:00 2001 From: heltai Date: Wed, 23 Oct 2013 11:47:56 +0000 Subject: [PATCH] Merged from trunk git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@31399 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/CMakeLists.txt | 7 +- deal.II/CTestConfig.cmake | 51 + deal.II/README | 4 +- deal.II/bundled/CMakeLists.txt | 2 +- .../boost/signals2/detail/foreign_ptr.hpp | 4 +- .../tbb41_20130401oss/src/CMakeLists.txt | 1 - .../cmake/checks/check_01_cxx_features.cmake | 26 +- .../checks/check_02_system_features.cmake | 33 +- .../cmake/checks/check_03_compiler_bugs.cmake | 17 +- deal.II/cmake/config/CMakeLists.txt | 11 +- deal.II/cmake/config/Config.cmake.in | 1 + deal.II/cmake/configure/configure_1_mpi.cmake | 85 +- .../cmake/configure/configure_1_threads.cmake | 23 +- .../configure/configure_2_trilinos.cmake | 2 +- deal.II/cmake/configure/configure_p4est.cmake | 27 +- deal.II/cmake/configure/configure_zlib.cmake | 5 + deal.II/cmake/macros/macro_add_test.cmake | 249 ++++ .../macro_deal_ii_insource_setup_target.cmake | 51 + .../macros/macro_deal_ii_setup_target.cmake | 5 +- deal.II/cmake/macros/macro_pickup_tests.cmake | 94 ++ deal.II/cmake/macros/macro_set_if_empty.cmake | 4 +- deal.II/cmake/modules/FindDEALII_LAPACK.cmake | 13 +- deal.II/cmake/modules/FindMETIS.cmake | 9 +- deal.II/cmake/modules/FindMUMPS.cmake | 21 + deal.II/cmake/modules/FindTBB.cmake | 23 +- deal.II/cmake/modules/FindUMFPACK.cmake | 25 + deal.II/cmake/scripts/CMakeLists.txt | 12 +- deal.II/cmake/scripts/normalize.pl | 47 + deal.II/cmake/scripts/run_buildtest.cmake | 2 + deal.II/cmake/scripts/run_test.cmake | 105 ++ deal.II/cmake/scripts/run_testsuite.cmake | 542 +++++++++ deal.II/cmake/setup_cached_variables.cmake | 7 + deal.II/cmake/setup_compiler_flags_gnu.cmake | 11 +- .../cmake/setup_compiler_flags_intel.cmake | 16 +- deal.II/cmake/setup_custom_targets.cmake | 64 +- deal.II/cmake/setup_deal_ii.cmake | 38 +- deal.II/cmake/setup_finalize.cmake | 17 +- deal.II/cmake/setup_post_project_call.cmake | 58 - deal.II/cmake/setup_testsuite.cmake | 108 ++ .../contrib/mesh_conversion/CMakeLists.txt | 8 +- deal.II/contrib/parameter_gui/CMakeLists.txt | 4 + deal.II/contrib/test_affinity/CMakeLists.txt | 46 - deal.II/contrib/utilities/build_test | 2 +- deal.II/doc/developers/cmake-internals.html | 1 + deal.II/doc/developers/testsuite.html | 1048 ++++++++++------- deal.II/doc/license.html | 2 +- deal.II/doc/news/changes.h | 47 + deal.II/doc/news/news.html | 4 +- deal.II/doc/publications/index.html | 29 +- deal.II/doc/readme.html | 37 +- deal.II/doc/screen.css | 21 +- deal.II/doc/users/Config.sample | 35 +- deal.II/doc/users/cmake.html | 259 +++- deal.II/examples/step-13/step-13.cc | 203 ++-- deal.II/examples/step-14/step-14.cc | 206 +++- .../deal.II/algorithms/newton.templates.h | 7 +- deal.II/include/deal.II/base/config.h.in | 18 +- deal.II/include/deal.II/base/exceptions.h | 136 ++- deal.II/include/deal.II/base/geometry_info.h | 12 +- deal.II/include/deal.II/base/logstream.h | 37 +- .../include/deal.II/base/std_cxx1x/array.h | 2 +- deal.II/include/deal.II/base/std_cxx1x/bind.h | 2 +- .../base/std_cxx1x/condition_variable.h | 2 +- .../include/deal.II/base/std_cxx1x/function.h | 2 +- .../include/deal.II/base/std_cxx1x/mutex.h | 2 +- .../deal.II/base/std_cxx1x/shared_ptr.h | 2 +- .../include/deal.II/base/std_cxx1x/thread.h | 2 +- .../include/deal.II/base/std_cxx1x/tuple.h | 2 +- .../deal.II/base/std_cxx1x/type_traits.h | 2 +- deal.II/include/deal.II/fe/fe_bdm.h | 1 - deal.II/include/deal.II/grid/tria_objects.h | 12 +- deal.II/include/deal.II/lac/eigen.h | 7 +- .../deal.II/lac/parallel_block_vector.h | 50 +- deal.II/include/deal.II/lac/parallel_vector.h | 353 ++++-- .../deal.II/lac/parallel_vector.templates.h | 168 +-- deal.II/include/deal.II/lac/slepc_solver.h | 12 +- deal.II/include/deal.II/lac/solver_bicgstab.h | 4 +- deal.II/include/deal.II/lac/solver_cg.h | 7 +- deal.II/include/deal.II/lac/solver_control.h | 280 ++--- deal.II/include/deal.II/lac/solver_gmres.h | 8 +- deal.II/include/deal.II/lac/solver_minres.h | 7 +- deal.II/include/deal.II/lac/solver_qmrs.h | 7 +- .../include/deal.II/lac/solver_relaxation.h | 7 +- .../include/deal.II/lac/solver_richardson.h | 14 +- deal.II/include/deal.II/lac/vector_memory.h | 4 +- .../deal.II/matrix_free/fe_evaluation.h | 360 +++++- .../include/deal.II/matrix_free/matrix_free.h | 134 ++- deal.II/source/CMakeLists.txt | 6 +- deal.II/source/base/CMakeLists.txt | 7 +- deal.II/source/base/data_out_base.cc | 31 +- deal.II/source/base/data_out_base.inst.in | 129 ++ deal.II/source/base/exceptions.cc | 14 +- deal.II/source/base/function_lib.cc | 2 +- deal.II/source/base/geometry_info.cc | 37 +- deal.II/source/base/parameter_handler.cc | 2 +- deal.II/source/base/subscriptor.cc | 4 +- deal.II/source/lac/chunk_sparsity_pattern.cc | 6 + deal.II/source/lac/petsc_solver.cc | 10 +- deal.II/source/lac/slepc_solver.cc | 6 +- deal.II/source/lac/solver_control.cc | 35 - deal.II/source/lac/trilinos_solver.cc | 12 +- deal.II/source/lac/vector_memory.cc | 4 +- .../source/numerics/data_out_dof_data.inst.in | 29 +- .../source/numerics/data_out_rotation.inst.in | 2 + .../source/numerics/data_out_stack.inst.in | 2 + deal.II/source/numerics/matrix_tools.cc | 6 - deal.II/tests/CMakeLists.txt | 122 ++ deal.II/tests/all-headers/CMakeLists.txt | 89 ++ deal.II/tests/all-headers/test_header.cc | 10 + deal.II/tests/build_tests/CMakeLists.txt | 182 +++ deal.II/tests/mesh_converter/CMakeLists.txt | 108 ++ .../mesh_converter/meshes/2d/2d_test.cub | Bin 0 -> 22952 bytes .../mesh_converter/meshes/2d/2d_test.inp | 252 ++++ .../mesh_converter/meshes/2d/2d_test.ucd | 251 ++++ .../tests/mesh_converter/meshes/2d/quad.cub | Bin 0 -> 14372 bytes .../tests/mesh_converter/meshes/2d/quad.inp | 29 + .../tests/mesh_converter/meshes/2d/quad.ucd | 25 + deal.II/tests/mesh_converter/meshes/3d/CC.cub | Bin 0 -> 51528 bytes .../mesh_converter/meshes/3d/CC_cubit_new.inp | 157 +++ .../mesh_converter/meshes/3d/CC_cubit_new.ucd | 106 ++ .../mesh_converter/meshes/3d/CC_cubit_old.inp | 113 ++ .../mesh_converter/meshes/3d/CC_cubit_old.ucd | 106 ++ .../mesh_converter/meshes/3d/other_simple.inp | 17 + .../mesh_converter/meshes/3d/other_simple.ucd | 13 + .../mesh_converter/meshes/3d/test_cube_1.cub | Bin 0 -> 25385 bytes .../mesh_converter/meshes/3d/test_cube_1.inp | 25 + .../mesh_converter/meshes/3d/test_cube_1.ucd | 19 + .../meshes/3d/test_cube_pave_1.cub | Bin 0 -> 29571 bytes .../meshes/3d/test_cube_pave_1.inp | 97 ++ .../meshes/3d/test_cube_pave_1.ucd | 91 ++ .../meshes/3d/test_cube_two_materials.cub | Bin 0 -> 27699 bytes .../meshes/3d/test_cube_two_materials.inp | 67 ++ .../meshes/3d/test_cube_two_materials.ucd | 63 + deal.II/tests/quick_tests/CMakeLists.txt | 56 + .../quick_tests/affinity.cc} | 5 +- 135 files changed, 6235 insertions(+), 1547 deletions(-) create mode 100644 deal.II/CTestConfig.cmake create mode 100644 deal.II/cmake/macros/macro_add_test.cmake create mode 100644 deal.II/cmake/macros/macro_deal_ii_insource_setup_target.cmake create mode 100644 deal.II/cmake/macros/macro_pickup_tests.cmake create mode 100644 deal.II/cmake/scripts/normalize.pl create mode 100644 deal.II/cmake/scripts/run_buildtest.cmake create mode 100644 deal.II/cmake/scripts/run_test.cmake create mode 100644 deal.II/cmake/scripts/run_testsuite.cmake delete mode 100644 deal.II/cmake/setup_post_project_call.cmake create mode 100644 deal.II/cmake/setup_testsuite.cmake delete mode 100644 deal.II/contrib/test_affinity/CMakeLists.txt create mode 100644 deal.II/source/base/data_out_base.inst.in create mode 100644 deal.II/tests/CMakeLists.txt create mode 100644 deal.II/tests/all-headers/CMakeLists.txt create mode 100644 deal.II/tests/all-headers/test_header.cc create mode 100644 deal.II/tests/build_tests/CMakeLists.txt create mode 100644 deal.II/tests/mesh_converter/CMakeLists.txt create mode 100644 deal.II/tests/mesh_converter/meshes/2d/2d_test.cub create mode 100644 deal.II/tests/mesh_converter/meshes/2d/2d_test.inp create mode 100644 deal.II/tests/mesh_converter/meshes/2d/2d_test.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/2d/quad.cub create mode 100644 deal.II/tests/mesh_converter/meshes/2d/quad.inp create mode 100644 deal.II/tests/mesh_converter/meshes/2d/quad.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/CC.cub create mode 100644 deal.II/tests/mesh_converter/meshes/3d/CC_cubit_new.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/CC_cubit_new.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/CC_cubit_old.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/CC_cubit_old.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/other_simple.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/other_simple.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_1.cub create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_1.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_1.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_pave_1.cub create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_pave_1.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_pave_1.ucd create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_two_materials.cub create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_two_materials.inp create mode 100644 deal.II/tests/mesh_converter/meshes/3d/test_cube_two_materials.ucd create mode 100644 deal.II/tests/quick_tests/CMakeLists.txt rename deal.II/{contrib/test_affinity/test_affinity.cc => tests/quick_tests/affinity.cc} (78%) diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index 239be6ea18..c5e09474bc 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -80,9 +80,8 @@ PROJECT(deal.II CXX) ENABLE_LANGUAGE_OPTIONAL(C) ENABLE_LANGUAGE_OPTIONAL(Fortran) -INCLUDE(setup_post_project_call) - INCLUDE(setup_deal_ii) + INCLUDE(setup_compiler_flags) # @@ -146,9 +145,7 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source ADD_SUBDIRECTORY(contrib) # has to be included after source ADD_SUBDIRECTORY(examples) -IF(DEAL_II_HAVE_TESTS_DIRECTORY) - ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests) -ENDIF() +ADD_SUBDIRECTORY(tests) # # And finally, print the configuration: diff --git a/deal.II/CTestConfig.cmake b/deal.II/CTestConfig.cmake new file mode 100644 index 0000000000..7d3855819d --- /dev/null +++ b/deal.II/CTestConfig.cmake @@ -0,0 +1,51 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Dashboard configuration: +# + +SET(CTEST_PROJECT_NAME "deal.II") + +SET(CTEST_DROP_METHOD "http") +SET(CTEST_DROP_SITE "cdash.kyomu.43-1.org") +SET(CTEST_DROP_LOCATION "/submit.php?project=deal.II") +SET(CTEST_DROP_SITE_CDASH TRUE) + +SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 100) +SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300) + +# number of lines to submit before an error: +SET(CTEST_CUSTOM_ERROR_PRE_CONTEXT 5) +# number of lines to submit after an error: +SET(CTEST_CUSTOM_ERROR_POST_CONTEXT 20) + +# +# Coverage options: +# + +SET(CTEST_EXTRA_COVERAGE_GLOB + # These files should have executable lines and therefore coverage: + # source/**/*.cc + ) + +SET(CTEST_CUSTOM_COVERAGE_EXCLUDE + "/bundled" + "/cmake/scripts/" + "/contrib" + "/examples" + "/tests" + ) diff --git a/deal.II/README b/deal.II/README index ba6501b3eb..3d878e4de0 100644 --- a/deal.II/README +++ b/deal.II/README @@ -15,7 +15,7 @@ For the impatient: $ make install (alternatively $ make -j install) A detailed ReadME can be found at ./doc/readme.html and - ./doc/development/cmake.html or at http://www.dealii.org/. + ./doc/users/cmake.html or at http://www.dealii.org/. Getting started: @@ -29,5 +29,5 @@ License: Further information: - For further information have a look at ./doc/readme.html or at + For further information have a look at ./doc/index.html or at http://www.dealii.org. diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt index 897b4632e1..ff7abbe921 100644 --- a/deal.II/bundled/CMakeLists.txt +++ b/deal.II/bundled/CMakeLists.txt @@ -41,7 +41,7 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED) ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/serialization/src) - IF( DEAL_II_WITH_THREADS AND NOT DEAL_II_CAN_USE_CXX11) + IF( DEAL_II_WITH_THREADS AND NOT DEAL_II_USE_CXX11) # # If the C++ compiler doesn't completely support the C++11 standard # (and consequently we can't use std::thread, std::mutex, etc), then diff --git a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp index 2e7be17839..a6ad99cae4 100644 --- a/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp +++ b/deal.II/bundled/boost-1.49.0/include/boost/signals2/detail/foreign_ptr.hpp @@ -39,7 +39,7 @@ namespace boost // should only be used by deal.II and dependent projects... // // - Maier, 2013 -#ifdef DEAL_II_CAN_USE_CXX11 +#ifdef DEAL_II_USE_CXX11 template struct weak_ptr_traits > { typedef std::shared_ptr shared_type; @@ -54,7 +54,7 @@ namespace boost typedef boost::weak_ptr weak_type; }; // as above -#ifdef DEAL_II_CAN_USE_CXX11 +#ifdef DEAL_II_USE_CXX11 template struct shared_ptr_traits > { typedef std::weak_ptr weak_type; diff --git a/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt index 1551dc14de..6e5c208abe 100644 --- a/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt +++ b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt @@ -118,4 +118,3 @@ ELSE() DEAL_II_ADD_DEFINITIONS(obj_tbb "DO_ITT_NOTIFY") ENDIF() ENDIF() - diff --git a/deal.II/cmake/checks/check_01_cxx_features.cmake b/deal.II/cmake/checks/check_01_cxx_features.cmake index 7fcf064bfb..84a9d178a2 100644 --- a/deal.II/cmake/checks/check_01_cxx_features.cmake +++ b/deal.II/cmake/checks/check_01_cxx_features.cmake @@ -21,7 +21,7 @@ # # DEAL_II_HAVE_CXX11_FLAG # DEAL_II_CXX11_FLAG -# DEAL_II_CAN_USE_CXX11 +# DEAL_II_USE_CXX11 # HAVE_ISNAN # HAVE_UNDERSCORE_ISNAN # DEAL_II_HAVE_ISFINITE @@ -168,7 +168,7 @@ IF(DEAL_II_HAVE_CXX11_FLAG) MESSAGE(STATUS "Sufficient C++11 support. Enabling ${DEAL_II_CXX11_FLAG}.") - SET(DEAL_II_CAN_USE_CXX11 TRUE) + SET(DEAL_II_USE_CXX11 TRUE) ADD_FLAGS(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}") @@ -176,17 +176,15 @@ IF(DEAL_II_HAVE_CXX11_FLAG) MESSAGE(STATUS "Insufficient C++11 support. Disabling ${DEAL_II_CXX11_FLAG}.") ENDIF() -# -# Currently unused -# -# IF(DEAL_II_CAN_USE_CXX11) -# # -# # Also test for a couple of C++11 things that we don't use in the -# # library but that users may want to use in their applications and that -# # we might want to test in the testsuite -# # -# # TODO: Actually we have to export the test results somehow. :-] -# # + IF(DEAL_II_USE_CXX11) + CHECK_CXX_SOURCE_COMPILES( + " + #include + int main(){ std::is_trivially_copyable bob; } + " + DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) + +# Currently unused: # # CHECK_CXX_SOURCE_COMPILES( # " @@ -212,7 +210,7 @@ IF(DEAL_II_HAVE_CXX11_FLAG) # SET(DEAL_II_CAN_USE_ADDITIONAL_CXX1X_FEATURES) # ENDIF() # -# ENDIF() + ENDIF() POP_TEST_FLAG() diff --git a/deal.II/cmake/checks/check_02_system_features.cmake b/deal.II/cmake/checks/check_02_system_features.cmake index 22e6a8a88b..7980378ed2 100644 --- a/deal.II/cmake/checks/check_02_system_features.cmake +++ b/deal.II/cmake/checks/check_02_system_features.cmake @@ -119,49 +119,22 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows") # Shared library handling: # IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - # # With MinGW we're lucky: - # ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--export-all-symbols") ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--enable-auto-import") ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--allow-multiple-definition") - - # - # Workaround for a miscompilation and linkage issue with shared libraries - # with MinGW. Replacing -O0 with -O1 seems to help.. - # - REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1") - ELSE() - - # # Otherwise disable shared libraries: - # MESSAGE(WARNING "\n" "BUILD_SHARED_LIBS forced to OFF\n\n" ) SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) ENDIF() - # - # Disable -ggdb and -g on Windows/MinGW targets for the moment until the - # compilation issues with too big files are resolved - # - # - Matthias Maier, 2012 - # - STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb") - STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb") - STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-g") - STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-g") ENDIF() -IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN") - # - # Workaround for a miscompilation and linkage issue with shared libraries - # under Cygwin. Replacing -O0 with -O1 helps. - # - # - Matthias Maier, 2013 - # - REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1") +IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" + OR CMAKE_SYSTEM_NAME MATCHES "Windows" ) + # TODO: Bailout if current compiler is not gcc-4.8.1 or newer ENDIF() diff --git a/deal.II/cmake/checks/check_03_compiler_bugs.cmake b/deal.II/cmake/checks/check_03_compiler_bugs.cmake index bb63ba0740..f2cc702cb0 100644 --- a/deal.II/cmake/checks/check_03_compiler_bugs.cmake +++ b/deal.II/cmake/checks/check_03_compiler_bugs.cmake @@ -320,6 +320,21 @@ IF(DEAL_II_ICC_NUMERICLIMITS_BUG) ) STRIP_FLAG(CMAKE_CXX_FLAGS "${DEAL_II_CXX11_FLAG}") SET(DEAL_II_CAN_USE_CXX1X FALSE) - SET(DEAL_II_CAN_USE_CXX11 FALSE) + SET(DEAL_II_USE_CXX11 FALSE) ENDIF() +# +# gcc-4.8.1 has some problems with the constexpr "vertices_per_cell" in the +# definition of alternating_form_at_vertices. +# +# TODO: Write a unit test. +# +# For now, just enable the workaround for Windows targets +# +# - Matthias Maier, 2013 +# + +IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN" + OR CMAKE_SYSTEM_NAME MATCHES "Windows" ) + SET(DEAL_II_CONSTEXPR_BUG TRUE) +ENDIF() diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index d640217ef4..a84bc40978 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -22,7 +22,7 @@ # deal.IIVersionConfig.cmake # # and copies it (a) to the build directory and (b) prepares it for later -# installation (the copy in CMAKE_CURRENT_BINARY_DIR). +# installation. # # @@ -335,18 +335,23 @@ ENDIF() # # Finally, add a target to create the "binary" file in -# ${DEAL_II_PROJECT_CONFIG_RELDIR} and add it to the library target: +# ${DEAL_II_PROJECT_CONFIG_RELDIR} and add it to the "all" target: # ADD_CUSTOM_TARGET(setup_build_dir ALL COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + COMMENT "Update build directory" ) -ADD_DEPENDENCIES(library setup_build_dir) +FOREACH(_build ${DEAL_II_BUILD_TYPES}) + ADD_DEPENDENCIES(setup_build_dir ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}) +ENDFOREACH() # # And a script to remove it upon installation from the install prefix: +# This is necessary if somebody wants to install into the build directory +# (yes this is a valid use case...). # INSTALL(CODE " diff --git a/deal.II/cmake/config/Config.cmake.in b/deal.II/cmake/config/Config.cmake.in index 53417f2bdf..8d5cd1a74d 100644 --- a/deal.II/cmake/config/Config.cmake.in +++ b/deal.II/cmake/config/Config.cmake.in @@ -173,6 +173,7 @@ SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@") # IF(DEAL_II_BUILD_DIR) + SET(DEAL_II_EXECUTABLE_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake") SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake") ELSE() SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake") diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake index 5140848840..cd92d2707c 100644 --- a/deal.II/cmake/configure/configure_1_mpi.cmake +++ b/deal.II/cmake/configure/configure_1_mpi.cmake @@ -54,23 +54,21 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var) ENDIF() FIND_PACKAGE(MPI) - IF(NOT MPI_CXX_FOUND) + IF(NOT MPI_CXX_FOUND AND DEAL_II_WITH_MPI) # # CMAKE_CXX_COMPILER is apparently not an mpi wrapper. - # So, let's be a bit more aggressive in finding MPI if DEAL_II_WITH_MPI - # is set. + # So, let's be a bit more aggressive in finding MPI (and if + # DEAL_II_WITH_MPI is set). # - IF(DEAL_II_WITH_MPI) - MESSAGE(STATUS - "MPI not found but DEAL_II_WITH_MPI is set to TRUE." - " Try again with more aggressive search paths:" - ) - SET(MPI_FOUND) # clear this value so that FIND_PACKAGE runs again. - UNSET(MPI_CXX_COMPILER CACHE) - UNSET(MPI_C_COMPILER CACHE) - UNSET(MPI_Fortran_COMPILER CACHE) - FIND_PACKAGE(MPI) - ENDIF() + MESSAGE(STATUS + "MPI not found but DEAL_II_WITH_MPI is set to TRUE." + " Try again with more aggressive search paths:" + ) + SET(MPI_FOUND) # clear this value so that FIND_PACKAGE runs again. + UNSET(MPI_CXX_COMPILER CACHE) + UNSET(MPI_C_COMPILER CACHE) + UNSET(MPI_Fortran_COMPILER CACHE) + FIND_PACKAGE(MPI) ENDIF() # @@ -82,12 +80,65 @@ MACRO(FEATURE_MPI_FIND_EXTERNAL var) ENDIF() ENDFOREACH() - # Hide some variables: - MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY) - IF(MPI_CXX_FOUND) + # + # Manually assemble some version information: + # + FIND_FILE(MPI_MPI_H NAMES mpi.h + HINTS ${MPI_INCLUDE_PATH} + ) + + IF(NOT MPI_MPI_H MATCHES "-NOTFOUND" AND NOT DEFINED MPI_VERSION) + FILE(STRINGS "${MPI_MPI_H}" MPI_VERSION_MAJOR_STRING + REGEX "#define.*MPI_VERSION") + STRING(REGEX REPLACE "^.*MPI_VERSION.*([0-9]+).*" "\\1" + MPI_VERSION_MAJOR "${MPI_VERSION_MAJOR_STRING}" + ) + FILE(STRINGS ${MPI_MPI_H} MPI_VERSION_MINOR_STRING + REGEX "#define.*MPI_SUBVERSION") + STRING(REGEX REPLACE "^.*MPI_SUBVERSION.*([0-9]+).*" "\\1" + MPI_VERSION_MINOR "${MPI_VERSION_MINOR_STRING}" + ) + SET(MPI_VERSION "${MPI_VERSION_MAJOR}.${MPI_VERSION_MINOR}") + IF("${MPI_VERSION}" STREQUAL ".") + SET(MPI_VERSION) + SET(MPI_VERSION_MAJOR) + SET(MPI_VERSION_MINOR) + ENDIF() + + # OMPI specific version number: + FILE(STRINGS ${MPI_MPI_H} OMPI_VERSION_MAJOR_STRING + REGEX "#define.*OMPI_MAJOR_VERSION") + STRING(REGEX REPLACE "^.*OMPI_MAJOR_VERSION.*([0-9]+).*" "\\1" + OMPI_VERSION_MAJOR "${OMPI_VERSION_MAJOR_STRING}" + ) + FILE(STRINGS ${MPI_MPI_H} OMPI_VERSION_MINOR_STRING + REGEX "#define.*OMPI_MINOR_VERSION") + STRING(REGEX REPLACE "^.*OMPI_MINOR_VERSION.*([0-9]+).*" "\\1" + OMPI_VERSION_MINOR "${OMPI_VERSION_MINOR_STRING}" + ) + FILE(STRINGS ${MPI_MPI_H} OMPI_VERSION_RELEASE_STRING + REGEX "#define.*OMPI_RELEASE_VERSION") + STRING(REGEX REPLACE "^.*OMPI_RELEASE_VERSION.*([0-9]+).*" "\\1" + OMPI_VERSION_SUBMINOR "${OMPI_VERSION_RELEASE_STRING}" + ) + SET(OMPI_VERSION + "${OMPI_VERSION_MAJOR}.${OMPI_VERSION_MINOR}.${OMPI_VERSION_SUBMINOR}" + ) + IF("${OMPI_VERSION}" STREQUAL "..") + SET(OMPI_VERSION) + SET(OMPI_VERSION_MAJOR) + SET(OMPI_VERSION_MINOR) + SET(OMPI_VERSION_SUBMINOR) + ENDIF() + ENDIF() + SET(${var} TRUE) ENDIF() + + # Hide some variables: + MARK_AS_ADVANCED(MPI_EXTRA_LIBRARY MPI_LIBRARY MPI_MPI_H) + ENDMACRO() diff --git a/deal.II/cmake/configure/configure_1_threads.cmake b/deal.II/cmake/configure/configure_1_threads.cmake index e6ddef4076..52e16e0ab8 100644 --- a/deal.II/cmake/configure/configure_1_threads.cmake +++ b/deal.II/cmake/configure/configure_1_threads.cmake @@ -22,7 +22,7 @@ # -# Set up genereal threading: +# Set up general threading: # The macro will be included in CONFIGURE_FEATURE_THREADS_EXTERNAL/BUNDLED. # MACRO(SETUP_THREADING) @@ -164,6 +164,16 @@ MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL) ENDIF() + # + # Workaround for an issue with C++11 mode, non gcc-compilers and missing + # template std::ist_trivially_copyable + # + IF( DEAL_II_USE_CXX11 AND + NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND + NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) + LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1") + LIST(APPEND DEAL_II_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1") + ENDIF() SETUP_THREADING() ENDMACRO() @@ -190,6 +200,17 @@ MACRO(FEATURE_THREADS_CONFIGURE_BUNDLED) ) ENDIF() + # + # Workaround for an issue with C++11 mode, non gcc-compilers and missing + # template std::ist_trivially_copyable + # + IF( DEAL_II_USE_CXX11 AND + NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND + NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" ) + LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1") + LIST(APPEND DEAL_II_USER_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1") + ENDIF() + # # tbb uses dlopen/dlclose, so link against libdl.so as well: # diff --git a/deal.II/cmake/configure/configure_2_trilinos.cmake b/deal.II/cmake/configure/configure_2_trilinos.cmake index ac15b34051..6693073042 100644 --- a/deal.II/cmake/configure/configure_2_trilinos.cmake +++ b/deal.II/cmake/configure/configure_2_trilinos.cmake @@ -160,7 +160,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) # with the -std=c++0x flag of GCC, see deal.II FAQ. # Test whether that is indeed the case # - IF(DEAL_II_CAN_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11) + IF(DEAL_II_USE_CXX11 AND NOT TRILINOS_SUPPORTS_CPP11) IF(TRILINOS_HAS_C99_TR1_WORKAROUND) LIST(APPEND DEAL_II_DEFINITIONS "HAS_C99_TR1_CMATH") diff --git a/deal.II/cmake/configure/configure_p4est.cmake b/deal.II/cmake/configure/configure_p4est.cmake index 9780127bc6..de91ef6ea1 100644 --- a/deal.II/cmake/configure/configure_p4est.cmake +++ b/deal.II/cmake/configure/configure_p4est.cmake @@ -24,6 +24,22 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var) FIND_PACKAGE(P4EST) IF(P4EST_FOUND) + SET(${var} TRUE) + + # + # We require at least version 0.3.4.1 + # + IF(P4EST_VERSION VERSION_LESS "0.3.4.1") + MESSAGE(STATUS "Insufficient p4est installation found: " + "At least version 0.3.4.1 is required." + ) + SET(P4EST_ADDITIONAL_ERROR_STRING + "Insufficient p4est installation found!\n" + "At least version 0.3.4.1 is required.\n" + ) + SET(${var} FALSE) + ENDIF() + # # Check whether p4est supports mpi: # @@ -32,10 +48,17 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var) "p4est has to be configured with MPI enabled." ) SET(P4EST_ADDITIONAL_ERROR_STRING + ${P4EST_ADDITIONAL_ERROR_STRING} "Insufficient p4est installation found!\n" "p4est has to be configured with MPI enabled.\n" ) + SET(${var} FALSE) + ENDIF() + # + # Reset configuration: + # + IF(NOT ${var}) UNSET(P4EST_LIBRARY_OPTIMIZED CACHE) UNSET(P4EST_LIBRARY_DEBUG CACHE) UNSET(P4EST_INCLUDE_DIR CACHE) @@ -46,12 +69,12 @@ MACRO(FEATURE_P4EST_FIND_EXTERNAL var) "An optional hint to a p4est installation/directory" ) MARK_AS_ADVANCED(CLEAR P4EST_DIR) - ELSE() - SET(${var} TRUE) ENDIF() + ENDIF() ENDMACRO() + MACRO(FEATURE_P4EST_CONFIGURE_EXTERNAL) INCLUDE_DIRECTORIES(${P4EST_INCLUDE_DIRS}) diff --git a/deal.II/cmake/configure/configure_zlib.cmake b/deal.II/cmake/configure/configure_zlib.cmake index 250210beac..772f66acbc 100644 --- a/deal.II/cmake/configure/configure_zlib.cmake +++ b/deal.II/cmake/configure/configure_zlib.cmake @@ -19,3 +19,8 @@ # CONFIGURE_FEATURE(ZLIB) + +# Export ZLIB_VERSION: +IF(DEFINED ZLIB_VERSION_STRING) + SET(ZLIB_VERSION ${ZLIB_VERSION_STRING}) +ENDIF() diff --git a/deal.II/cmake/macros/macro_add_test.cmake b/deal.II/cmake/macros/macro_add_test.cmake new file mode 100644 index 0000000000..0bda009a4c --- /dev/null +++ b/deal.II/cmake/macros/macro_add_test.cmake @@ -0,0 +1,249 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# A Macro to set up tests for the testsuite +# +# The following variables must be set: +# +# TEST_DIFF +# - specifying the executable and command line of the diff command to use +# +# TEST_TIME_LIMIT +# - specifying the maximal wall clock time in seconds a test is allowed +# to run +# +# +# Usage: +# DEAL_II_ADD_TEST(category test_name comparison_file [ARGN]) +# +# This macro assumes that a source file "./tests/category/.cc" +# as well as the comparison file "./tests/category/" is +# available in the testsuite. The output of compiled source file is +# compared against the file comparison file. +# +# [ARGN] is an optional list of additional output lines passed down to the +# run_test.cmake script and printed at the beginning of the test output. +# +# This macro gets the following options from the comparison file name (have +# a look at the testsuite documentation for details): +# - usage of mpirun and number of simultaneous processes +# - valid build configurations +# - expected test stage +# + +MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file) + + IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED) + MESSAGE(FATAL_ERROR + "\nDEAL_II_ADD_TEST can only be called in external test subprojects after " + "the inclusion of deal.IIConfig.cmake. It is not intended for " + "internal use.\n\n" + ) + ENDIF() + + GET_FILENAME_COMPONENT(_file ${_comparison_file} NAME) + + # + # Determine valid build configurations for this test: + # + + SET(_configuration) + IF(_file MATCHES "debug") + SET(_configuration DEBUG) + ELSEIF(_file MATCHES "release") + SET(_configuration RELEASE) + ENDIF() + + # + # Determine whether the test should be run with mpirun: + # + + STRING(REGEX MATCH "mpirun=([0-9]*)" _n_cpu ${_file}) + IF("${_n_cpu}" STREQUAL "") + SET(_n_cpu 0) # 0 indicates that no mpirun should be used + ELSE() + STRING(REGEX REPLACE "^mpirun=([0-9]*)$" "\\1" _n_cpu ${_n_cpu}) + ENDIF() + + # + # Determine the expected build stage of this test: + # + + STRING(REGEX MATCH "expect=([a-z]*)" _expect ${_file}) + IF("${_expect}" STREQUAL "") + SET(_expect "PASSED") + ELSE() + STRING(REGEX REPLACE "^expect=([a-z]*)$" "\\1" _expect ${_expect}) + STRING(TOUPPER ${_expect} _expect) + ENDIF() + + + FOREACH(_build ${DEAL_II_BUILD_TYPES}) + + ITEM_MATCHES(_match "${_build}" ${_configuration}) + IF(_match OR "${_configuration}" STREQUAL "") + + # + # Setup a bunch of variables describing the test: + # + STRING(TOLOWER ${_build} _build_lowercase) + SET(_target ${_test_name}.${_build_lowercase}) # target name + + # If _n_cpu is equal to "0", a normal, sequental test will be run, + # otherwise run the test with mpirun: + IF("${_n_cpu}" STREQUAL "0") + + SET(_diff_target ${_target}.diff) # diff target name + SET(_test_full ${_category}/${_test_name}.${_build_lowercase}) # full test name + SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_target}) # directory to run the test in + SET(_run_command ${_target}) # the command to issue + + ELSE() + + SET(_diff_target ${_test_name}.mpirun${_n_cpu}.${_build_lowercase}.diff) # diff target name + SET(_test_full ${_category}/${_test_name}.mpirun=${_n_cpu}.${_build_lowercase}) # full test name + SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_target}/mpirun=${_n_cpu}) # directory to run the test in + SET(_run_command mpirun -np ${_n_cpu} ${CMAKE_CURRENT_BINARY_DIR}/${_target}/${_target}) # the command to issue + + ENDIF() + + FILE(MAKE_DIRECTORY ${_test_directory}) + + # + # Add an executable for the current test and set up compile + # definitions and the full link interface: + # + IF(NOT TARGET ${_target}) + # only add the target once + + ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${_test_name}.cc) + + SET_TARGET_PROPERTIES(${_target} PROPERTIES + LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" + COMPILE_DEFINITIONS "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_${_build}}" + COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" + LINKER_LANGUAGE "CXX" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_target}" + ) + SET_PROPERTY(TARGET ${_target} APPEND PROPERTY + INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}" + ) + SET_PROPERTY(TARGET ${_target} APPEND PROPERTY + COMPILE_DEFINITIONS + SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}" + ) + TARGET_LINK_LIBRARIES(${_target} ${DEAL_II_TARGET_${_build}}) + ENDIF() + + # + # Add a top level target to run and compare the test: + # + + ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/output + COMMAND rm -f ${_test_directory}/failing_output + COMMAND touch ${_test_directory}/output + COMMAND + ${_run_command} + || (mv ${_test_directory}/output + ${_test_directory}/failing_output + && echo "${_test_full}: BUILD successful." + && echo "${_test_full}: RUN failed. ------ Result: ${_test_directory}/failing_output" + && echo "${_test_full}: RUN failed. ------ Partial output:" + && cat ${_test_directory}/failing_output + && exit 1) + COMMAND + ${PERL_EXECUTABLE} -pi ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl + ${_test_directory}/output + WORKING_DIRECTORY + ${_test_directory} + DEPENDS + ${_target} + ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl + ) + ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff + COMMAND rm -f ${_test_directory}/failing_diff + COMMAND touch ${_test_directory}/diff + COMMAND + ${TEST_DIFF} + ${_test_directory}/output + ${_comparison_file} + > ${_test_directory}/diff + || (mv ${_test_directory}/diff + ${_test_directory}/failing_diff + && echo "${_test_full}: BUILD successful." + && echo "${_test_full}: RUN successful." + && echo "${_test_full}: DIFF failed. ------ Source: ${_comparison_file}" + && echo "${_test_full}: DIFF failed. ------ Result: ${_test_directory}/output" + && echo "${_test_full}: DIFF failed. ------ Diff: ${_test_directory}/failing_diff" + && echo "${_test_full}: DIFF failed. ------ Diffs as follows:" + && cat ${_test_directory}/failing_diff + && exit 1) + WORKING_DIRECTORY + ${_test_directory} + DEPENDS + ${_test_directory}/output + ${_comparison_file} + ) + + ADD_CUSTOM_TARGET(${_diff_target} DEPENDS ${_test_directory}/diff + COMMAND + echo "${_test_full}: BUILD successful." + && echo "${_test_full}: RUN successful." + && echo "${_test_full}: DIFF successful." + && echo "${_test_full}: PASSED." + ) + + # + # And finally add the test: + # + + ADD_TEST(NAME ${_test_full} + COMMAND ${CMAKE_COMMAND} + -DTRGT=${_diff_target} + -DTEST=${_test_full} + -DEXPECT=${_expect} + -DADDITIONAL_OUTPUT=${ARGN} + -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR} + -P ${DEAL_II_SOURCE_DIR}/cmake/scripts/run_test.cmake + WORKING_DIRECTORY ${_test_directory} + ) + SET_TESTS_PROPERTIES(${_test_full} PROPERTIES + LABEL "${_category}" + TIMEOUT ${TEST_TIME_LIMIT} + ) + + # + # We have to be careful not to run different mpirun settings for the + # same executable in parallel because this triggers a race condition + # when compiling the not yet existent executable that is shared + # between the different tests. + # + # Luckily CMake has a mechanism to force a test to be run when + # another has finished (and both are scheduled): + # + IF(NOT "${_n_cpu}" STREQUAL "0") + IF(DEFINED TEST_DEPENDENCIES_${_target}) + SET_TESTS_PROPERTIES(${_test_full} PROPERTIES + DEPENDS ${TEST_DEPENDENCIES_${_target}} + ) + ENDIF() + SET(TEST_DEPENDENCIES_${_target} ${_test_full}) + ENDIF() + + ENDIF() + ENDFOREACH() +ENDMACRO() diff --git a/deal.II/cmake/macros/macro_deal_ii_insource_setup_target.cmake b/deal.II/cmake/macros/macro_deal_ii_insource_setup_target.cmake new file mode 100644 index 0000000000..daa070b2ae --- /dev/null +++ b/deal.II/cmake/macros/macro_deal_ii_insource_setup_target.cmake @@ -0,0 +1,51 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## Copyright (C) 2012 - 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# This file provides an insource version of the DEAL_II_SETUP_TARGET macro. +# +# Usage: +# DEAL_II_INSOURCE_SETUP_TARGET(target build) +# +# This appends necessary include directories, linker flags, compile +# definitions and the deal.II library link interface to the given target. +# +# + +MACRO(DEAL_II_INSOURCE_SETUP_TARGET _target _build) + + SET_TARGET_PROPERTIES(${_target} PROPERTIES + LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" + COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" + COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}" + LINKER_LANGUAGE "CXX" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_test_short}" + ) + SET_PROPERTY(TARGET ${_target} APPEND PROPERTY + INCLUDE_DIRECTORIES + "${CMAKE_BINARY_DIR}/include" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/include/deal.II/" + ) + +GET_PROPERTY(_type TARGET ${_target} PROPERTY TYPE) +IF(NOT "${_type}" STREQUAL "OBJECT_LIBRARY") + TARGET_LINK_LIBRARIES(${_target} + ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX} + ) +ENDIF() + +ENDMACRO() diff --git a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake index 28b88dd1d0..df0a3a1387 100644 --- a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake @@ -121,7 +121,10 @@ MACRO(DEAL_II_SETUP_TARGET _target) # # Set up the link interface: # - TARGET_LINK_LIBRARIES(${_target} ${DEAL_II_TARGET}) + GET_PROPERTY(_type TARGET ${_target} PROPERTY TYPE) + IF(NOT "${_type}" STREQUAL "OBJECT_LIBRARY") + TARGET_LINK_LIBRARIES(${_target} ${DEAL_II_TARGET}) + ENDIF() # # If DEAL_II_STATIC_EXECUTABLE is set, switch the final link type to diff --git a/deal.II/cmake/macros/macro_pickup_tests.cmake b/deal.II/cmake/macros/macro_pickup_tests.cmake new file mode 100644 index 0000000000..954c615d17 --- /dev/null +++ b/deal.II/cmake/macros/macro_pickup_tests.cmake @@ -0,0 +1,94 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# A macro to pick up all tests in a test subdirectory +# +# If TEST_PICKUP_REGEX is set, only tests matching the regex will be +# processed. +# +# If TEST_OVERRIDE_LOCATION is set, a comparison file category/test.output +# will be substituted by ${TEST_OVERRIDE_LOCATION}/category/test.output if +# the latter exists. +# +# Usage: +# DEAL_II_PICKUP_TESTS() +# + +MACRO(DEAL_II_PICKUP_TESTS) + SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}") + + GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME) + + SET(DEAL_II_SOURCE_DIR) # avoid a bogus warning + + FILE(GLOB _tests "*.output") + FOREACH(_test ${_tests}) + SET(_comparison ${_test}) + GET_FILENAME_COMPONENT(_test ${_test} NAME) + + # + # Respect TEST_PICKUP_REGEX: + # + + IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR + "${_category}/${_test}" MATCHES "${TEST_PICKUP_REGEX}" ) + SET(_define_test TRUE) + ELSE() + SET(_define_test FALSE) + ENDIF() + + # + # Query configuration and check whether we support it. Otherwise + # set _define_test to FALSE: + # + + STRING(REGEX MATCHALL + "with_([0-9]|[a-z]|_)*=(on|off|yes|no|true|false)" _matches ${_test} + ) + FOREACH(_match ${_matches}) + STRING(REGEX REPLACE + "^(with_([0-9]|[a-z]|_)*)=(on|off|yes|no|true|false)$" "\\1" + _feature ${_match} + ) + STRING(TOUPPER ${_feature} _feature) + STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match}) + + IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR + (NOT DEAL_II_${_feature} AND ${_boolean}) ) + SET(_define_test FALSE) + ENDIF() + ENDFOREACH() + + # + # Respect TEST_OVERRIDE_LOCATION: + # + + SET(_add_output) + IF(EXISTS ${TEST_OVERRIDE_LOCATION}/${_category}/${_test}) + SET(_add_output + "!!NOTE!! Comparison file overriden by ${TEST_OVERRIDE_LOCATION}/${_category}/${_test}" + ) + SET(_comparison "${TEST_OVERRIDE_LOCATION}/${_category}/${_test}") + ENDIF() + + IF(_define_test) + STRING(REGEX REPLACE "\\..*" "" _test ${_test}) + DEAL_II_ADD_TEST(${_category} ${_test} ${_comparison} ${_add_output}) + ENDIF() + + ENDFOREACH() +ENDMACRO() diff --git a/deal.II/cmake/macros/macro_set_if_empty.cmake b/deal.II/cmake/macros/macro_set_if_empty.cmake index 43f0125445..35acf55729 100644 --- a/deal.II/cmake/macros/macro_set_if_empty.cmake +++ b/deal.II/cmake/macros/macro_set_if_empty.cmake @@ -17,9 +17,9 @@ # # If 'variable' is empty it will be set to 'value' # -MACRO(SET_IF_EMPTY _variable _value) +MACRO(SET_IF_EMPTY _variable) IF("${${_variable}}" STREQUAL "") - SET(${_variable} ${_value}) + SET(${_variable} ${ARGN}) ENDIF() ENDMACRO() diff --git a/deal.II/cmake/modules/FindDEALII_LAPACK.cmake b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake index b1c7630265..be470cec36 100644 --- a/deal.II/cmake/modules/FindDEALII_LAPACK.cmake +++ b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake @@ -88,18 +88,23 @@ IF(LAPACK_FOUND) # Well, in case of static archives we have to manually pick up the # complete link interface. *sigh* # - # Do this unconditionally for the most common case: - # TODO: Non-GNU setups... + # If CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES is not available, do it + # unconditionally for the most common case (gfortran). # # Switch the library preference back to prefer dynamic libraries if # DEAL_II_PREFER_STATIC_LIBS=TRUE but DEAL_II_STATIC_EXECUTABLE=FALSE. In # this case system libraries should be linked dynamically. # + SET(_fortran_libs ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) + SET_IF_EMPTY(_fortran_libs gfortran m quadmath c) + SWITCH_LIBRARY_PREFERENCE() - FOREACH(_lib gfortran m quadmath) + FOREACH(_lib ${_fortran_libs}) FIND_LIBRARY(${_lib}_LIBRARY NAMES ${_lib} - HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) + HINTS + ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES} + ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) MARK_AS_ADVANCED(${_lib}_LIBRARY) IF(NOT ${_lib}_LIBRARY MATCHES "-NOTFOUND") diff --git a/deal.II/cmake/modules/FindMETIS.cmake b/deal.II/cmake/modules/FindMETIS.cmake index 29c9be531f..005905aecc 100644 --- a/deal.II/cmake/modules/FindMETIS.cmake +++ b/deal.II/cmake/modules/FindMETIS.cmake @@ -78,7 +78,14 @@ MARK_AS_ADVANCED( IF(METIS_FOUND) - IF(NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND") + # + # Sanity check: Only include parmetis library if it is in the same + # directory as the metis library... + # + GET_FILENAME_COMPONENT(_path1 "${PARMETIS_LIBRARY}" PATH) + GET_FILENAME_COMPONENT(_path2 "${ETIS_LIBRARY}" PATH) + IF( NOT PARMETIS_LIBRARY MATCHES "-NOTFOUND" + AND "${_path1}" STREQUAL "${_path2}" ) SET(METIS_LIBRARIES ${PARMETIS_LIBRARY}) ENDIF() diff --git a/deal.II/cmake/modules/FindMUMPS.cmake b/deal.II/cmake/modules/FindMUMPS.cmake index 24e48975de..6099238908 100644 --- a/deal.II/cmake/modules/FindMUMPS.cmake +++ b/deal.II/cmake/modules/FindMUMPS.cmake @@ -22,6 +22,10 @@ # MUMPS_INCLUDE_DIRS # MUMPS_LIBRARIES # MUMPS_LINKER_FLAGS +# MUMPS_VERSION +# MUMPS_VERSION_MAJOR +# MUMPS_VERSION_MINOR +# MUMPS_VERSION_SUBMINOR # SET_IF_EMPTY(MUMPS_DIR "$ENV{MUMPS_DIR}") @@ -72,6 +76,23 @@ IF(PORD_LIBRARY MATCHES "-NOTFOUND") UNSET(PORD_LIBRARY CACHE) ENDIF() +IF(EXISTS ${MUMPS_INCLUDE_DIR}/dmumps_c.h) + FILE(STRINGS "${MUMPS_INCLUDE_DIR}/dmumps_c.h" MUMPS_VERSION_STRING + REGEX "#define.*MUMPS_VERSION") + STRING(REGEX REPLACE "^.*MUMPS_VERSION.*\"(.+)\".*" "\\1" + MUMPS_VERSION "${MUMPS_VERSION_STRING}" + ) + STRING(REGEX REPLACE + "([0-9]+)\\..*" "\\1" MUMPS_VERSION_MAJOR "${MUMPS_VERSION}" + ) + STRING(REGEX REPLACE + "^[0-9]+\\.([0-9]+).*" "\\1" MUMPS_VERSION_MINOR "${MUMPS_VERSION}" + ) + STRING(REGEX REPLACE + "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" MUMPS_VERSION_SUBMINOR "${MUMPS_VERSION}" + ) +ENDIF() + SET(_output ${DMUMPS_LIBRARY} ${MUMPS_COMMON_LIBRARY} ${PORD_LIBRARY}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(MUMPS DEFAULT_MSG _output # Cosmetic: Gives nice output diff --git a/deal.II/cmake/modules/FindTBB.cmake b/deal.II/cmake/modules/FindTBB.cmake index 4c45373cec..82f407417e 100644 --- a/deal.II/cmake/modules/FindTBB.cmake +++ b/deal.II/cmake/modules/FindTBB.cmake @@ -22,13 +22,16 @@ # TBB_LIBRARIES # TBB_INCLUDE_DIRS # TBB_WITH_DEBUGLIB +# TBB_VERSION +# TBB_VERSION_MAJOR +# TBB_VERSION_MINOR # INCLUDE(FindPackageHandleStandardArgs) SET_IF_EMPTY(TBB_DIR "$ENV{TBB_DIR}") -FIND_PATH(TBB_INCLUDE_DIR tbb/parallel_reduce.h +FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h HINTS ${TBB_DIR} PATH_SUFFIXES include include/tbb tbb @@ -59,6 +62,24 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(TBB DEFAULT_MSG TBB_INCLUDE_DIR ) +IF(NOT TBB_INCLUDE_DIR MATCHES "-NOTFOUND") + FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MAJOR_STRING + REGEX "#define.*TBB_VERSION_MAJOR") + STRING(REGEX REPLACE "^.*TBB_VERSION_MAJOR.*([0-9]+).*" "\\1" + TBB_VERSION_MAJOR "${TBB_VERSION_MAJOR_STRING}" + ) + + FILE(STRINGS "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" TBB_VERSION_MINOR_STRING + REGEX "#define.*TBB_VERSION_MINOR") + STRING(REGEX REPLACE "^.*TBB_VERSION_MINOR.*([0-9]+).*" "\\1" + TBB_VERSION_MINOR "${TBB_VERSION_MINOR_STRING}" + ) + + SET(TBB_VERSION + "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" + ) +ENDIF() + MARK_AS_ADVANCED( TBB_LIBRARY TBB_DEBUG_LIBRARY diff --git a/deal.II/cmake/modules/FindUMFPACK.cmake b/deal.II/cmake/modules/FindUMFPACK.cmake index 746fdf0143..8f5ed61440 100644 --- a/deal.II/cmake/modules/FindUMFPACK.cmake +++ b/deal.II/cmake/modules/FindUMFPACK.cmake @@ -22,6 +22,10 @@ # UMFPACK_LIBRARIES # UMFPACK_INCLUDE_DIRS # UMFPACK_LINKER_FLAGS +# UMFPACK_VERSION +# UMFPACK_VERSION_MAJOR +# UMFPACK_VERSION_MINOR +# UMFPACK_VERSION_SUBMINOR # INCLUDE(FindPackageHandleStandardArgs) @@ -110,6 +114,27 @@ FIND_UMFPACK_LIBRARY(CCOLAMD ccolamd) FIND_UMFPACK_LIBRARY(CAMD camd) FIND_UMFPACK_LIBRARY(SuiteSparse_config suitesparseconfig) +IF(EXISTS ${UMFPACK_INCLUDE_DIR}/umfpack.h) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_MAJOR_STRING + REGEX "#define.*UMFPACK_MAIN_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_MAIN_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_MAJOR "${UMFPACK_VERSION_MAJOR_STRING}" + ) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_MINOR_STRING + REGEX "#define.*UMFPACK_SUB_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_SUB_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_MINOR "${UMFPACK_VERSION_MINOR_STRING}" + ) + FILE(STRINGS "${UMFPACK_INCLUDE_DIR}/umfpack.h" UMFPACK_VERSION_SUBMINOR_STRING + REGEX "#define.*UMFPACK_SUBSUB_VERSION") + STRING(REGEX REPLACE "^.*UMFPACK_SUBSUB_VERSION.*([0-9]+).*" "\\1" + UMFPACK_VERSION_SUBMINOR "${UMFPACK_VERSION_SUBMINOR_STRING}" + ) + SET(UMFPACK_VERSION + "${UMFPACK_VERSION_MAJOR}.${UMFPACK_VERSION_MINOR}.${UMFPACK_VERSION_SUBMINOR}" + ) +ENDIF() + SET(_output ${UMFPACK_LIBRARY} ${CHOLMOD_LIBRARY} ${CCOLAMD_LIBRARY} ${COLAMD_LIBRARY} ${CAMD_LIBRARY} ${AMD_LIBRARY} ${SuiteSparse_config_LIBRARY}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(UMFPACK DEFAULT_MSG _output # Cosmetic: Gives nice output diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 299cc0257c..6e000ece9b 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -19,17 +19,16 @@ IF(NOT CMAKE_CROSSCOMPILING) IF(DEAL_II_COMPONENT_COMPAT_FILES) SET_TARGET_PROPERTIES(expand_instantiations - PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts ) INSTALL(TARGETS expand_instantiations - EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts COMPONENT compat_files ) ENDIF() EXPORT(TARGETS expand_instantiations - FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake + FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake ) ENDIF() @@ -90,12 +89,15 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) ENDIF() SET_TARGET_PROPERTIES(make_dependencies report_features - PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/scripts ) INSTALL(TARGETS make_dependencies report_features - EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts COMPONENT compat_files ) + EXPORT(TARGETS make_dependencies report_features + FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake + APPEND + ) ENDIF() diff --git a/deal.II/cmake/scripts/normalize.pl b/deal.II/cmake/scripts/normalize.pl new file mode 100644 index 0000000000..b29534ec1b --- /dev/null +++ b/deal.II/cmake/scripts/normalize.pl @@ -0,0 +1,47 @@ +###################################################################### +# $Id$ +# +# Copyright (C) 2001, 2003, 2005, 2010, 2011, 2012, 2013, the deal.II authors +# +# Remove insignificant volatile data from output files of tests +# +# Data affected: +# JobID line (containing date) +# line number of exceptions +# start and final residual in iterations +# small doubles +###################################################################### + +# Remove JobID + +s/JobId.*//; + +# Remove Input File Name: + +s/# Input file name:.*//; + +# Several date and time strings + +s/%%Creation Date:.*//; +s/\"created\".*//; +s/# Time =.*//; +s/# Date =.*//; +s/^\s+Time =.*//; +s/^\s+Date =.*//; +s/Time tag:.*//g; +s/by the deal.II library on.*//; + +# Exceptions + +s/line <\d+> of file <.*\//file /run_testsuite.cmake +# +# The following configuration variables can be overwritten with +# +# ctest -D= [...] +# +# +# CTEST_SOURCE_DIRECTORY +# - The source directory of deal.II (usually ending in "[...]/deal.II" +# (equivalent to https://svn.dealii.org/trunk/deal.II) +# Note: This is _not_ the test directory ending in "[...]/tests" +# - If unspecified, "../deal.II" relative to the location of this +# script is used. If this is not a source directory, an error is +# thrown. +# +# CTEST_BINARY_DIRECTORY +# - The designated build directory (already configured, empty, or non +# existent - see the information about TRACKs what will happen) +# - If unspecified the current directory is used. If the current +# directory is equal to CTEST_SOURCE_DIRECTORY or the "tests" +# directory, an error is thrown. +# +# CTEST_CMAKE_GENERATOR +# - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see +# $ man cmake) +# - If unspecified the generator of a configured build directory will +# be used, otherwise "Unix Makefiles". +# +# TRACK +# - The track the test should be submitted to. Defaults to +# "Experimental". Possible values are: +# +# "Experimental" - all tests that are not specifically "build" or +# "regression" tests should go into this track +# +# "Build Tests" - Build tests that configure and build in a +# clean directory and run the build tests +# "build_tests/*" +# +# "Nightly" - Reserved for nightly regression tests for +# build bots on various architectures +# +# "Regression Tests" - Reserved for the regression tester +# +# CONFIG_FILE +# - A configuration file (see ../deal.II/docs/development/Config.sample) +# that will be used during the configuration stage (invokes +# # cmake -C ${CONFIG_FILE}). This only has an effect if +# CTEST_BINARY_DIRECTORY is empty. +# +# COVERAGE +# - If set to TRUE deal.II will be configured with +# DEAL_II_SETUP_COVERAGE=TRUE, CMAKE_BUILD_TYPE=Debug and the +# CTEST_COVERAGE() stage will be run. Test results must go into the +# "Experimental" section. +# +# Furthermore, the following variables controlling the testsuite can be set +# and will be automatically handed down to cmake: +# +# TEST_DIFF +# TEST_TIME_LIMIT +# TEST_PICKUP_REGEX +# TEST_OVERRIDE_LOCATION +# NUMDIFF_DIR +# +# For details, consult the ./README file. +# + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) +MESSAGE("-- This is CTest ${CMAKE_VERSION}") + +# +# TRACK: Default to Experimental: +# + +IF("${TRACK}" STREQUAL "") + SET(TRACK "Experimental") +ENDIF() + +IF( NOT "${TRACK}" STREQUAL "Experimental" + AND NOT "${TRACK}" STREQUAL "Build Tests" + AND NOT "${TRACK}" STREQUAL "Nightly" + AND NOT "${TRACK}" STREQUAL "Regression Tests" ) + MESSAGE(FATAL_ERROR " +Unknown TRACK \"${TRACK}\" - see the manual for valid values. +" + ) +ENDIF() + +MESSAGE("-- TRACK: ${TRACK}") + +# +# CTEST_SOURCE_DIRECTORY: +# + +IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "") + # + # If CTEST_SOURCE_DIRECTORY is not set we just assume that this script + # was called residing under cmake/scipts in the source directory + # + GET_FILENAME_COMPONENT(_path "${CMAKE_CURRENT_LIST_DIR}" PATH) + GET_FILENAME_COMPONENT(CTEST_SOURCE_DIRECTORY "${_path}" PATH) + + IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CMakeLists.txt) + MESSAGE(FATAL_ERROR " +Could not find a suitable source directory. There is no source directory +\"../deal.II\" or \"../../\" relative to the location of this script. +Please, set CTEST_SOURCE_DIRECTORY manually to the appropriate source +directory. +" + ) + ENDIF() +ENDIF() + +MESSAGE("-- CTEST_SOURCE_DIRECTORY: ${CTEST_SOURCE_DIRECTORY}") + +# +# Read in custom config files: +# + +CTEST_READ_CUSTOM_FILES(${CTEST_SOURCE_DIRECTORY}) + +# +# CTEST_BINARY_DIRECTORY: +# + +IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "") + # + # If CTEST_BINARY_DIRECTORY is not set we just use the current directory + # except if it is equal to CTEST_SOURCE_DIRECTORY in which case we fail. + # + SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIRECTORY}") + MESSAGE(FATAL_ERROR " +ctest was invoked in the source directory (or test source directory) and CTEST_BINARY_DIRECTORY is not set. +Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly. +" + ) + ENDIF() +ENDIF() + +# +# Read in custom config files: +# + +CTEST_READ_CUSTOM_FILES(${CTEST_BINARY_DIRECTORY}) + +# Make sure that for a build test the directory is empty: +FILE(GLOB _test ${CTEST_BINARY_DIRECTORY}/*) +IF( "${TRACK}" STREQUAL "Build Tests" + AND NOT "${_test}" STREQUAL "" ) + MESSAGE(FATAL_ERROR " +TRACK was set to \"Build Tests\" which require an empty build directory. +But files were found in \"${CTEST_BINARY_DIRECTORY}\" +" + ) +ENDIF() + +MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}") + +# +# CTEST_CMAKE_GENERATOR: +# + +# Query Generator from build directory (if possible): +IF(EXISTS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt) + FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt _generator + REGEX "^CMAKE_GENERATOR:" + ) + STRING(REGEX REPLACE "^.*=" "" _generator ${_generator}) +ENDIF() + +IF("${CTEST_CMAKE_GENERATOR}" STREQUAL "") + IF(NOT "${_generator}" STREQUAL "") + SET(CTEST_CMAKE_GENERATOR ${_generator}) + ELSE() + # default to "Unix Makefiles" + SET(CTEST_CMAKE_GENERATOR "Unix Makefiles") + ENDIF() +ELSE() + # ensure that CTEST_CMAKE_GENERATOR (that was apparantly set) is + # compatible with the build directory: + IF( NOT "${CTEST_CMAKE_GENERATOR}" STREQUAL "${_generator}" + AND NOT "${_generator}" STREQUAL "" ) + MESSAGE(FATAL_ERROR " +The build directory is already set up with Generator \"${_generator}\", but +CTEST_CMAKE_GENERATOR was set to a different Generator \"${CTEST_CMAKE_GENERATOR}\". +" + ) + ENDIF() +ENDIF() + +MESSAGE("-- CTEST_CMAKE_GENERATOR: ${CTEST_CMAKE_GENERATOR}") + +# +# CTEST_SITE: +# + +FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname) +EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname) +SET(CTEST_SITE "${_hostname}") + +MESSAGE("-- CTEST_SITE: ${CTEST_SITE}") + +IF( "${TRACK}" STREQUAL "Regression Tests" + AND NOT CTEST_SITE MATCHES "c0541" ) + MESSAGE(FATAL_ERROR " +I'm sorry ${CTEST_SITE}, I'm afraid I can't do that. +The TRACK \"Regression Tests\" is not for you. +" + ) +ENDIF() + +# +# Assemble configuration options, we need it now: +# + +IF(NOT "${CONFIG_FILE}" STREQUAL "") + SET(_options "-C${CONFIG_FILE}") +ENDIF() + +IF("${TRACK}" STREQUAL "Build Tests") + SET(TEST_PICKUP_REGEX "^build_tests") +ENDIF() + +# Pass all relevant "TEST_" variables down to configure: +GET_CMAKE_PROPERTY(_variables VARIABLES) +FOREACH(_var ${_variables}) + IF(_var MATCHES + "^(TEST_DIFF|TEST_TIME_LIMIT|TEST_PICKUP_REGEX|TEST_OVERRIDE_LOCATION|NUMDIFF_DIR)$" + ) + LIST(APPEND _options "-D${_var}=${${_var}}") + ENDIF() +ENDFOREACH() + +IF(COVERAGE) + LIST(APPEND _options "-DDEAL_II_SETUP_COVERAGE=TRUE") + LIST(APPEND _options "-DCMAKE_BUILD_TYPE=Debug") +ENDIF() + +# +# CTEST_BUILD_NAME: +# + +# Append compiler information to CTEST_BUILD_NAME: +IF(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log) + # Apparently, ${CTEST_BINARY_DIRECTORY} is not a configured build + # directory. In this case we need a trick: set up a dummy project and + # query it for the compiler information. + FILE(WRITE ${CTEST_BINARY_DIRECTORY}/query_for_compiler/CMakeLists.txt " +FILE(WRITE ${CTEST_BINARY_DIRECTORY}/detailed.log + \"# CMAKE_CXX_COMPILER: \${CMAKE_CXX_COMPILER_ID} \${CMAKE_CXX_COMPILER_VERSION} on platform \${CMAKE_SYSTEM_NAME} \${CMAKE_SYSTEM_PROCESSOR}\" + )" + ) + EXECUTE_PROCESS( + COMMAND ${CMAKE_COMMAND} ${_options} "-G${CTEST_CMAKE_GENERATOR}" . + OUTPUT_QUIET ERROR_QUIET + WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}/query_for_compiler + ) + FILE(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/query_for_compiler) +ENDIF() + +IF(EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log) + FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/detailed.log _compiler_id + REGEX "CMAKE_CXX_COMPILER:" + ) + STRING(REGEX REPLACE + "^.*CMAKE_CXX_COMPILER: \(.*\) on platform.*$" "\\1" + _compiler_id ${_compiler_id} + ) + STRING(REGEX REPLACE "^\(.*\) .*$" "\\1" _compiler_name ${_compiler_id}) + STRING(REGEX REPLACE "^.* " "" _compiler_version ${_compiler_id}) + STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id}) + IF( NOT "${_compiler_id}" STREQUAL "" OR + _compiler_id MATCHES "CMAKE_CXX_COMPILER" ) + SET(CTEST_BUILD_NAME "${_compiler_id}") + ENDIF() +ENDIF() + +# +# Append subversion branch to CTEST_BUILD_NAME: +# +FIND_PACKAGE(Subversion QUIET) +EXECUTE_PROCESS( + COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY} + OUTPUT_QUIET ERROR_QUIET + RESULT_VARIABLE _result + ) +IF(${_result} EQUAL 0) + Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn) + STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL}) + STRING(REGEX REPLACE "^branches/" "" _branch ${_branch}) + STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch}) + SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}") +ENDIF() + +# +# Append config file name to CTEST_BUILD_NAME: +# + +IF(NOT "${CONFIG_FILE}" STREQUAL "") + GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE) + STRING(REGEX REPLACE "#.*$" "" _conf ${_conf}) + SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}") +ENDIF() + +MESSAGE("-- CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}") + +# +# We require valid svn information for build tests: +# + +IF( "${TRACK}" STREQUAL "Build Tests" + AND NOT DEFINED _svn_WC_REVISION ) + MESSAGE(FATAL_ERROR " +TRACK was set to \"Build Tests\" which requires the source directory to be +under Subversion version control. +" + ) +ENDIF() + +# +# Write revision log: +# + +IF(DEFINED _svn_WC_REVISION) + FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log +"### +# +# SVN information: +# SVN_WC_URL: ${_svn_WC_URL} +# SVN_WC_REVISION: ${_svn_WC_REVISION} +# SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE} +# +###" + ) +ELSE() + FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log +"### +# +# No SVN information available. +# +###" + ) +ENDIF() + +# +# Declare files that should be submitted as notes: +# + +SET(CTEST_NOTES_FILES + ${CTEST_BINARY_DIRECTORY}/revision.log + ${CTEST_BINARY_DIRECTORY}/summary.log + ${CTEST_BINARY_DIRECTORY}/detailed.log + ${CTEST_BINARY_DIRECTORY}/include/deal.II/base/config.h + ) + +# +# Setup coverage: +# +IF(COVERAGE) + IF(NOT TRACK MATCHES "Experimental") + MESSAGE(FATAL_ERROR " +TRACK must be set to \"Experimental\" if Coverage is enabled via +COVERAGE=TRUE. +" + ) + ENDIF() + + FIND_PROGRAM(GCOV_COMMAND NAMES gcov) + + IF(GCOV_COMMAND MATCHES "-NOTFOUND") + MESSAGE(FATAL_ERROR " +Coverage enabled but could not find the gcov executable. Please install +gcov, which is part of the GNU Compiler Collection. +" + ) + ENDIF() + + SET(CTEST_COVERAGE_COMMAND "${GCOV_COMMAND}") +ENDIF() + +MESSAGE("-- COVERAGE: ${COVERAGE}") + + +MACRO(CREATE_TARGETDIRECTORIES_TXT) + # + # It gets tricky: Fake a TargetDirectories.txt containing _all_ target + # directories (of the main project and all subprojects) so that the + # CTEST_COVERAGE() actually picks everything up... + # + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy + ${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt + ${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt.bck + ) + FILE(GLOB _subprojects ${CTEST_BINARY_DIRECTORY}/tests/*) + FOREACH(_subproject ${_subprojects}) + IF(EXISTS ${_subproject}/CMakeFiles/TargetDirectories.txt) + FILE(READ ${_subproject}/CMakeFiles/TargetDirectories.txt _var) + FILE(APPEND ${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt ${_var}) + ENDIF() + ENDFOREACH() +ENDMACRO() + +MACRO(CLEAR_TARGETDIRECTORIES_TXT) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E rename + ${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt.bck + ${CTEST_BINARY_DIRECTORY}/CMakeFiles/TargetDirectories.txt + ) +ENDMACRO() + + +######################################################################## +# # +# Run the testsuite: # +# # +######################################################################## + +IF(NOT "${_branch}" STREQUAL "") + SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch}) +ENDIF() + +CTEST_START(Experimental TRACK ${TRACK}) + +MESSAGE("-- Running CTEST_CONFIGURE()") +CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res) + +IF("${_res}" STREQUAL "0") + # Only run the build stage if configure was successful: + + MESSAGE("-- Running CTEST_BUILD()") + CTEST_BUILD(TARGET NUMBER_ERRORS _res) + + IF("${_res}" STREQUAL "0") + # Only run tests if the build was successful: + + MESSAGE("-- Running make setup_tests") + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} + --build ${CTEST_BINARY_DIRECTORY} --target setup_tests + OUTPUT_QUIET RESULT_VARIABLE _res + ) + IF(NOT "${_res}" STREQUAL "0") + MESSAGE(FATAL_ERROR " +\"setup_tests\" target exited with an error. Bailing out. +" + ) + ENDIF() + + MESSAGE("-- Running CTEST_TESTS()") + CTEST_TEST() + + IF(COVERAGE) + CREATE_TARGETDIRECTORIES_TXT() + MESSAGE("-- Running CTEST_COVERAGE()") + CTEST_COVERAGE() + CLEAR_TARGETDIRECTORIES_TXT() + ENDIF(COVERAGE) + + ENDIF() +ENDIF() + +# +# Inject compiler information and svn revision into xml files: +# + +FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG _tag LIMIT_COUNT 1) +SET(_path "${CTEST_BINARY_DIRECTORY}/Testing/${_tag}") +IF(NOT EXISTS ${_path}) + MESSAGE(FATAL_ERROR " +Unable to determine test submission files from TAG. Bailing out. +" + ) +ENDIF() +FILE(GLOB _xml_files ${_path}/*.xml) +EXECUTE_PROCESS(COMMAND sed -i -e + s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g + ${_xml_files} + OUTPUT_QUIET RESULT_VARIABLE _res + ) +IF(NOT "${_res}" STREQUAL "0") + MESSAGE(FATAL_ERROR " +\"sed\" failed. Bailing out. +" + ) +ENDIF() + +IF(NOT "${_svn_WC_REVISION}" STREQUAL "") + FILE(WRITE ${_path}/Update.xml +" + + ${CTEST_SITE} + ${CTEST_BUILD_NAME} + ${_tag}-${TRACK} + SVN + ${_svn_WC_REVISION} + ${_branch} +" + ) +ENDIF() + +# +# And finally submit: +# + +MESSAGE("-- Running CTEST_SUBMIT()") +CTEST_SUBMIT(RETURN_VALUE _res) + +IF("${_res}" STREQUAL "0") + MESSAGE("-- Submission successful. Goodbye!") +ENDIF() + +# .oO( This script is freaky 541 lines long... ) diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index c2e04fe20d..8d476fb437 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -35,6 +35,7 @@ # CMAKE_BUILD_TYPE # DEAL_II_ALLOW_PLATFORM_INTROSPECTION # DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS +# DEAL_II_SETUP_COVERAGE # BUILD_SHARED_LIBS # DEAL_II_PREFER_STATIC_LIBS # DEAL_II_STATIC_EXECUTABLE @@ -152,6 +153,12 @@ OPTION(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS ) MARK_AS_ADVANCED(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS) +OPTION(DEAL_II_SETUP_COVERAGE + "Setup debug compiler flags to provide additional test coverage information. Currently only gprof is supported." + OFF + ) +MARK_AS_ADVANCED(DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS) + SET(BUILD_SHARED_LIBS "ON" CACHE BOOL "Build a shared library" ) diff --git a/deal.II/cmake/setup_compiler_flags_gnu.cmake b/deal.II/cmake/setup_compiler_flags_gnu.cmake index 14884e265d..177473121c 100644 --- a/deal.II/cmake/setup_compiler_flags_gnu.cmake +++ b/deal.II/cmake/setup_compiler_flags_gnu.cmake @@ -133,7 +133,6 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-all-loops") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fstrict-aliasing") - ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-felide-constructors") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-Wno-unused") ENDIF() @@ -167,5 +166,15 @@ IF (CMAKE_BUILD_TYPE MATCHES "Debug") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-g") ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-g") ENDIF() + + IF(DEAL_II_SETUP_COVERAGE) + # + # Enable test coverage + # + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-fno-elide-constructors") + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ftest-coverage -fprofile-arcs") + ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-ftest-coverage -fprofile-arcs") + ENDIF() + ENDIF() diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake index 98afb1943b..44a3188c7e 100644 --- a/deal.II/cmake/setup_compiler_flags_intel.cmake +++ b/deal.II/cmake/setup_compiler_flags_intel.cmake @@ -108,6 +108,11 @@ IF(DEAL_II_STATIC_EXECUTABLE) ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static-intel") ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static-gcc") ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-pthread") +ELSE() + # + # Explicitly link intel support libraries dynamically: + # + ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-shared-intel") ENDIF() @@ -122,9 +127,7 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release") # General optimization flags: # - IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13.0" ) - ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2") - ELSE() + IF(CMAKE_CXX_COMPILER_VERSION MATCHES "^13\\.") # # Disable aggressive optimization for intel-13* compilers, until we # resolve a lot of funny miscompilations... @@ -132,13 +135,16 @@ IF (CMAKE_BUILD_TYPE MATCHES "Release") # - Maier, 2013 # ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O1") + ELSE() + ADD_FLAGS(DEAL_II_CXX_FLAGS_RELEASE "-O2") ENDIF() + # equivalent to -fno-strict-aliasing: + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias") + ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-ip") ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-funroll-loops") - # equivalent to -fno-strict-aliasing: - ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias") ENDIF() diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index 864ebc955b..65399c645b 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -17,29 +17,32 @@ # # Add convenience targets that build and install only a specific component: # +# library +# compat_files +# documentation +# examples +# mesh_converter +# parameter_gui +# -FOREACH(_component library) - ADD_CUSTOM_TARGET(${_component} - COMMAND ${CMAKE_COMMAND} - -DCOMPONENT="${_component}" -P cmake_install.cmake - COMMENT "Build and install component \"${_component}\"." - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - ) -ENDFOREACH() +# The library can always be installed ;-) +ADD_CUSTOM_TARGET(library + COMMAND ${CMAKE_COMMAND} + -DCOMPONENT="library" -P cmake_install.cmake + COMMENT "Build and install component \"library\"." + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) FOREACH(_component compat_files documentation examples mesh_converter parameter_gui) STRING(TOUPPER "${_component}" _component_uppercase) IF(DEAL_II_COMPONENT_${_component_uppercase}) - ADD_CUSTOM_TARGET(${_component} COMMAND ${CMAKE_COMMAND} -DCOMPONENT="${_component}" -P cmake_install.cmake COMMENT "Build and install component \"${_component}\"." WORKING_DIRECTORY ${CMAKE_BINARY_DIR} ) - ELSE() - STRING(TOUPPER ${_component} _componentuppercase) ADD_CUSTOM_TARGET(${_component} COMMAND @@ -53,7 +56,44 @@ FOREACH(_component compat_files documentation examples mesh_converter parameter_ && ${CMAKE_COMMAND} -E echo '' && false ) - ENDIF() ENDFOREACH() +# +# Provide an "info" target to print a help message: +# + +FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake +"MESSAGE( +\"### +# +# The following targets are available (invoke by $ make ): +# +# all - compiles the library and all enabled components +# clean - removes all generated files +# install - installs into CMAKE_INSTALL_PREFIX +# help - prints a list of valid top level targets +# info - prints this help message +# +# edit_cache - runs ccmake for changing (cached) configuration variables +# and reruns the configure and generate phases of CMake +# rebuild_cache - reruns the configure and generate phases of CMake +# +# compat_files - builds and installs the 'compat_files' component +# documentation - builds and installs the 'documentation' component +# examples - builds and installs the 'examples' component +# library - builds and installs the 'library' component +# mesh_converter - builds and installs the 'mesh_converter' component +# parameter_gui - builds and installs the 'parameter_gui' component +# +# test - runs a minimal set of tests +# +# setup_tests - sets up the testsuite subprojects +# clean_tests - runs the 'clean' target in every testsuite subproject +# prune_tests - removes all testsuite subprojects +# +###\")" + ) +ADD_CUSTOM_TARGET(info + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake + ) diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index a07c54f465..58fbd0e16e 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -18,7 +18,8 @@ # Set up deal.II specific definitions # # This file defines a long list of uncached variables, used throughout the -# configuration to determine paths, locations and names. +# configuration to determine paths, locations and names. Some linkage and +# crosscompilation setup happens also in here. # # Definitions marked with *) can be overriden by defining them to cache # prior to the call of this file. This is done with the help of the @@ -135,7 +136,6 @@ ELSE() SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}") ENDIF() - IF(CMAKE_BUILD_TYPE MATCHES "Debug") LIST(APPEND DEAL_II_BUILD_TYPES "DEBUG") ENDIF() @@ -144,3 +144,37 @@ IF(CMAKE_BUILD_TYPE MATCHES "Release") LIST(APPEND DEAL_II_BUILD_TYPES "RELEASE") ENDIF() + +######################################################################## +# # +# Setup static linkage and crosscompilation: # +# # +######################################################################## + +# +# Library search order: +# +IF(DEAL_II_PREFER_STATIC_LIBS) + # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS + # is set. This will prefer static archives instead of shared libraries: + LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) +ENDIF() + +# +# Cross compilation stuff: +# +IF(CMAKE_CROSSCOMPILING) + # Disable platform introspection when cross compiling + SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE) + + # Import native expand_instantiations for use in cross compilation: + SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH + "A pointer to a native deal.Ii build directory" + ) + IF(DEAL_II_NATIVE MATCHES "-NOTFOUND") + MESSAGE(FATAL_ERROR + "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory" + ) + ENDIF() + INCLUDE(${DEAL_II_NATIVE}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake) +ENDIF() diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index bcb40185ee..4c4fc377ff 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -121,6 +121,10 @@ _both( # CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR} # CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} # ${CMAKE_CXX_COMPILER} +" + ) +_detailed( +"# CMAKE_GENERATOR: ${CMAKE_GENERATOR} " ) IF(CMAKE_CROSSCOMPILING) @@ -200,6 +204,12 @@ FOREACH(_var ${_features}) # IF(DEFINED ${_feature}_VERSION) _detailed("# ${_feature}_VERSION = ${${_feature}_VERSION}\n") + ELSEIF(_feature MATCHES "THREADS" AND DEFINED TBB_VERSION) + _detailed("# TBB_VERSION = ${TBB_VERSION}\n") + ENDIF() + + IF(_feature MATCHES "MPI" AND DEFINED OMPI_VERSION) + _detailed("# OMPI_VERSION = ${OMPI_VERSION}\n") ENDIF() # @@ -216,9 +226,9 @@ FOREACH(_var ${_features}) IF( # MPI: _var2 MATCHES "^${_feature}_CXX_(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH)$" OR # Boost: - ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost(_LIBRARIES|_INCLUDE_DIRS)$" ) OR + ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost_(LIBRARIES|INCLUDE_DIRS)$" ) OR # TBB: - ( _feature MATCHES "THREADS" AND _var2 MATCHES "^TBB(_LIBRARIES|_INCLUDE_DIRS)$" ) OR + ( _feature MATCHES "THREADS" AND _var2 MATCHES "^TBB_(LIBRARIES|INCLUDE_DIRS)$" ) OR # Generic: ( (NOT _var2 MATCHES "^(MPI|Boost)") AND _var2 MATCHES "^${_feature}_(INCLUDE_DIRS|LIBRARIES|LINKER_FLAGS)$" ) @@ -258,7 +268,8 @@ FOREACH(_var ${_components}) ENDFOREACH() _summary( - "#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log\n" +"#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log +#\n# Run $ make info to print a help message with a list of top level targets\n" ) _both("#\n###") diff --git a/deal.II/cmake/setup_post_project_call.cmake b/deal.II/cmake/setup_post_project_call.cmake deleted file mode 100644 index 60aad894df..0000000000 --- a/deal.II/cmake/setup_post_project_call.cmake +++ /dev/null @@ -1,58 +0,0 @@ -## --------------------------------------------------------------------- -## $Id$ -## -## Copyright (C) 2013 by the deal.II authors -## -## This file is part of the deal.II library. -## -## The deal.II library is free software; you can use it, redistribute -## it, and/or modify it under the terms of the GNU Lesser General -## Public License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## The full text of the license can be found in the file LICENSE at -## the top level of the deal.II distribution. -## -## --------------------------------------------------------------------- - - -######################################################################## -# # -# Setup that has to happen after the call to PROJECT(): # -# # -######################################################################## - -# -# Library search order: -# -IF(DEAL_II_PREFER_STATIC_LIBS) - # - # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS - # is set. This will prefer static archives instead of shared libraries: - # - # TODO: Does this work on a Windows or CYGWIN target? - LIST(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) -ENDIF() - - -# -# Cross compilation stuff: -# -IF(CMAKE_CROSSCOMPILING) - # - # Disable platform introspection when cross compiling - # - SET(DEAL_II_ALLOW_PLATFORM_INTROSPECTION OFF CACHE BOOL "" FORCE) - - # - # Import native expand_instantiations for use in cross compilation: - # - SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH - "A pointer to a native deal.Ii build directory" - ) - IF(DEAL_II_NATIVE MATCHES "-NOTFOUND") - MESSAGE(FATAL_ERROR - "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory" - ) - ENDIF() - INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake) -ENDIF() diff --git a/deal.II/cmake/setup_testsuite.cmake b/deal.II/cmake/setup_testsuite.cmake new file mode 100644 index 0000000000..cd334b751e --- /dev/null +++ b/deal.II/cmake/setup_testsuite.cmake @@ -0,0 +1,108 @@ +## --------------------------------------------------------------------- +## $Id$ +## +## Copyright (C) 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## The deal.II library is free software; you can use it, redistribute +## it, and/or modify it under the terms of the GNU Lesser General +## Public License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## The full text of the license can be found in the file LICENSE at +## the top level of the deal.II distribution. +## +## --------------------------------------------------------------------- + +# +# Setup necessary configuration in the testsuite subprojects. +# This file is directly included by the test subprojects and not by the +# main project. +# +# It is assumed that the following variables are set: +# +# DEAL_II_BINARY_DIR +# DEAL_II_SOURCE_DIR +# - pointing to a source and binary directory of a deal.II build +# +# This file sets up the following options, that can be overwritten by +# environment or command line: +# +# TEST_DIFF +# TEST_OVERRIDE_LOCATION +# TEST_PICKUP_REGEX +# TEST_TIME_LIMIT +# + +# +# Load all macros: +# +FILE(GLOB _macro_files ${DEAL_II_SOURCE_DIR}/cmake/macros/*.cmake) +FOREACH(_file ${_macro_files}) + INCLUDE(${_file}) +ENDFOREACH() + +# +# Pick up values from environment: +# +SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_BINARY_DIR}) +SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_DIR}) +SET_IF_EMPTY(DEAL_II_SOURCE_DIR $ENV{DEAL_II_SOURCE_DIR}) +SET_IF_EMPTY(TEST_DIFF $ENV{TEST_DIFF}) +SET_IF_EMPTY(TEST_TIME_LIMIT $ENV{TEST_TIME_LIMIT}) +SET_IF_EMPTY(TEST_PICKUP_REGEX $ENV{TEST_PICKUP_REGEX}) +SET_IF_EMPTY(TEST_OVERRIDE_LOCATION $ENV{TEST_OVERRIDE_LOCATION}) + +# +# We need deal.II and Perl as external packages: +# +FIND_PACKAGE(deal.II 8.0 REQUIRED + HINTS ${DEAL_II_BINARY_DIR} ${DEAL_II_DIR} + ) +SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.") + +FIND_PACKAGE(Perl REQUIRED) + +# +# We need a diff tool, preferably numdiff: +# +FIND_PROGRAM(DIFF_EXECUTABLE + NAMES diff + ) + +FIND_PROGRAM(NUMDIFF_EXECUTABLE + NAMES numdiff + HINTS ${NUMDIFF_DIR} + PATH_SUFFIXES bin + ) + +MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE) + +IF( NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND" + AND DIFF_EXECUTABLE MATCHES "-NOTFOUND" ) + MESSAGE(FATAL_ERROR + "Could not find diff or numdiff. One of those are required for running the testsuite." + ) +ENDIF() + +IF("${TEST_DIFF}" STREQUAL "") + IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND") + SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -s ' \\t\\n:') + ELSE() + SET(TEST_DIFF ${DIFF_EXECUTABLE}) + ENDIF() +ELSE() + # TODO: I have no idea how to prepare a custom string comming possibly + # through two layers of command line into a list... + SEPARATE_ARGUMENTS(TEST_DIFF ${TEST_DIFF}) +ENDIF() + +# +# Set a default time limit of 600 seconds: +# +SET_IF_EMPTY(TEST_TIME_LIMIT 600) + +# +# And finally, enable testing: +# +ENABLE_TESTING() diff --git a/deal.II/contrib/mesh_conversion/CMakeLists.txt b/deal.II/contrib/mesh_conversion/CMakeLists.txt index 72e26ef2c4..f17569af7d 100644 --- a/deal.II/contrib/mesh_conversion/CMakeLists.txt +++ b/deal.II/contrib/mesh_conversion/CMakeLists.txt @@ -32,7 +32,11 @@ IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "") ENDIF() INSTALL(TARGETS mesh_converter_exe - RUNTIME - DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} + RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} COMPONENT mesh_converter ) +EXPORT(TARGETS mesh_converter_exe + FILE + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake + APPEND + ) diff --git a/deal.II/contrib/parameter_gui/CMakeLists.txt b/deal.II/contrib/parameter_gui/CMakeLists.txt index 7ff3f24f7e..c06c0823dc 100644 --- a/deal.II/contrib/parameter_gui/CMakeLists.txt +++ b/deal.II/contrib/parameter_gui/CMakeLists.txt @@ -59,4 +59,8 @@ INSTALL(TARGETS parameter_gui_exe RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} COMPONENT parameter_gui ) +EXPORT(TARGETS parameter_gui_exe + FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Executables.cmake + APPEND + ) diff --git a/deal.II/contrib/test_affinity/CMakeLists.txt b/deal.II/contrib/test_affinity/CMakeLists.txt deleted file mode 100644 index 83075153c0..0000000000 --- a/deal.II/contrib/test_affinity/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -## --------------------------------------------------------------------- -## $Id$ -## -## Copyright (C) 2013 by the deal.II authors -## -## This file is part of the deal.II library. -## -## The deal.II library is free software; you can use it, redistribute -## it, and/or modify it under the terms of the GNU Lesser General -## Public License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## The full text of the license can be found in the file LICENSE at -## the top level of the deal.II distribution. -## -## --------------------------------------------------------------------- - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8) - -INCLUDE_DIRECTORIES( - BEFORE - ${CMAKE_SOURCE_DIR}/include/ - ${CMAKE_BINARY_DIR}/include/ - ) - -ADD_EXECUTABLE(test_affinity - test_affinity.cc - ) - -IF(CMAKE_BUILD_TYPE MATCHES "Debug") - SET(_build "DEBUG") -ELSE() - SET(_build "RELEASE") -ENDIF() - -SET_TARGET_PROPERTIES(test_affinity PROPERTIES - LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" - COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" - COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}" - LINKER_LANGUAGE "CXX" - ) - -TARGET_LINK_LIBRARIES(test_affinity ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}) - -IF(NOT CMAKE_CROSSCOMPILING) - ADD_CUSTOM_TARGET(run_test_affinity COMMAND test_affinity) -ENDIF() diff --git a/deal.II/contrib/utilities/build_test b/deal.II/contrib/utilities/build_test index b2c7487e43..ef00405480 100755 --- a/deal.II/contrib/utilities/build_test +++ b/deal.II/contrib/utilities/build_test @@ -27,7 +27,7 @@ # SOURCEDIR=$(CURDIR) LOGDIR=$(PWD) -TMPDIR=/tmp +TMPDIR?=/tmp CMAKE=cmake SVN=svn info $(SOURCEDIR) diff --git a/deal.II/doc/developers/cmake-internals.html b/deal.II/doc/developers/cmake-internals.html index b568a0527f..ea9c6a97b7 100644 --- a/deal.II/doc/developers/cmake-internals.html +++ b/deal.II/doc/developers/cmake-internals.html @@ -40,6 +40,7 @@
  • ./cmake/config/CMakeLists.txt
  • + diff --git a/deal.II/doc/developers/testsuite.html b/deal.II/doc/developers/testsuite.html index 54229442f2..9eb8dd343b 100644 --- a/deal.II/doc/developers/testsuite.html +++ b/deal.II/doc/developers/testsuite.html @@ -17,347 +17,537 @@

    The deal.II Testsuite

    -

    The deal.II testsuite consists of two parts, the - build tests and the - regression tests. While the build tests - just check if the - library can be compiled on different systems and with different (versions - of) compilers, the regression tests are actually run and their output - compared with previously stored. These two testsuites are - described below.

    - - -

    The build tests

    +

    + The deal.II testsuite consists of two parts: + build tests and the + regression testsuite. While the build tests + are used to check that the + library can be compiled on different systems and with different (versions + of) compilers, the regression tests are actually run and their output + compared with previously stored output files to verify that what + worked yesterday still works today. These two testsuites are + described below. +

    - With our build tests, we check if deal.II can be compiled on - different systems and with different compilers as well as - different configuration options. Results are collected in a - database and can be accessed online.

    + deal.II has a testsuite that has, at the time this article is written + (mid-2013), some 2,900 small programs (growing by roughly one per day) + that we run every time we make a change to make sure that no existing + functionality is broken. The expected output for every test is stored in + our subversion archive, and when you run a test you are notified if a + test produces different output. These days, every time we add a + significant piece of functionality, we add at least one new test to the + testsuite, and we also do so if we fix a bug, in both cases to make sure + that future changes do not break what we have just checked in. Machines + running tests send results + back home and these are then converted into + a webpage showing the status of our regression tests. +

    -

    Running the build test suite is simple and we encourage deal.II - users with configurations not found on the test suite page to - participate. Assuming you checked out deal.II into the directory - dealtest, running it is as simple as: +

    + + +

    Quick instructions

    + +

    + If you're impatient, use the following commands:

     
    -    cd dealtest
    -    svn update
    -    ./contrib/utilities/build_test
    -    mail build-tests@dealii.org < *.log
    -  ( rm *.log )
    +    $ mkdir new_directory
    +    $ cd new_directory
    +    $ svn checkout https://svn.dealii.org/trunk .
    +    $ mkdir build
    +    $ cd build
    +    $ cmake ../deal.II
    +    $ make -j16
    +    $ make -j16 setup_tests
    +    $ ctest -j16
           
    + The exact meaning of all of these commands will be explained in much + greater detail below. +

    + + +

    Setting up the testsuite

    + +

    In order to run it, you need to download and set up the testsuite + first. The following paragraphs detail how to do that.

    + +

    Downloading the testsuite

    +

    - The build_test script supports the following options: + To download the testsuite, check it out from the subversion repository, + along with deal.II. To this end, go to an empty directory where you + want to test deal.II and do this:

     
    -    SOURCEDIR     - the source directory to use (otherwise the current directory is used)
    -    CONFIGFILE    - A cmake configuration file for the build test
    -    LOGDIR        - directory for the log file
    -    LOGFILE       - the logfile to use, defaults to
    -                        $LOGDIR/$BRANCH.$CONFIGFILE..log
    -
    -    CMAKE         - the cmake executable to use
    -    SVN           - svn info command to use, defaults to
    -                        svn info $(SOURCEDIR)
    -    TMPDIR        - defaults to "/tmp"
    -    CLEAN_TMPDIR  - defaults to "true"
    -    RUN_EXAMPLES  - defaults to "true"
    +    $ svn checkout https://svn.dealii.org/trunk .
           
    - An example configuration file can be found here. Options can be passed either via - environment + (The period at the end puts everything from under trunk/ + into the current directory, rather than creating a + new trunk/ directory.) You will then have + two folders:
     
    -    export CONFIGFILE=MyConfiguration.conf
    -    ./contrib/utilities/build_test
    +    ./deal.II
    +    ./tests
           
    - or directly on the command line: +

    + +

    + Note: CMake will pick up any testsuite that is located in a + tests folder next to the source directory + (../tests). If your test directory is at a different + location you have to hint during configuration by specifying + TEST_DIR:

     
    -    ./contrib/utilities/build_test CONFIGFILE=myConfiguration.conf
    +    $ cmake -DTEST_DIR=<...>
           

    + +

    Preparing the testsuite

    +

    - A status indicator should appear on the build test website after some - time (results are collected and processed by a program that is run - periodically, but not immediately after a mail has been received). -

    + To enable the testsuite, configure and build deal.II in a build + directory as normal (installation is not necessary). After that you + can setup the testsuite via the "setup_tests" target:s +
     
    +    $ make setup_tests
    +      
    + This will set up all tests supported by the current configuration. + The testsuite can now be run in the current build directory as + described below. +

    -

    Dedicated build tests

    +

    + Setup can be fine-tuned using the following commands: +

     
    -    There is a detailed example for dedicated build tests on the wiki.
    +    $ make clean_tests - runs the 'clean' target in every testsuite subproject
     
    -    
    -    

    The regression tests

    + $ make prune_tests - removes all testsuite subprojects +

    - deal.II has a testsuite that, at the time this article is written (mid-2013), - has some 2,900 small programs (growing by roughly one per day) that we run - every time we make a - change to make sure that no existing functionality is broken. The - expected output is also stored in our subversion archive, and when you - run a test you are notified if a test fails. These days, every - time we add a significant piece of functionality, we add at least - one new test to the testsuite, and we also do so if we fix a bug, - in both cases to make sure that future changes do not break what - we have just checked in. In addition, some machines run the tests - every night and send the results back home; this is then converted - into a webpage showing the status of our regression - tests. + In addition, when setting up the testsuite, the following environment + variables can be used to override default behavior when + calling make setup_tests: +

    +
    +    TEST_DIFF
    +      - The diff tool and command line to use for comparison. If numdiff is
    +        available it defaults to "numdiff -a 1e-6 -q", otherwise plain diff
    +        is used.
    +
    +    TEST_TIME_LIMIT
    +      - The time limit (in seconds) a single test is allowed to take. Defaults
    +        to 180 seconds
    +
    +    TEST_PICKUP_REGEX
    +      - A regular expression to select only a subset of tests during setup.
    +        An empty string is interpreted as a catchall (this is the default).
    +
    +    TEST_OVERRIDE_LOCATION
    +      - If TEST_OVERRIDE_LOCATION is set, a comparison file category/test.output
    +        will be substituted by ${TEST_OVERRIDE_LOCATION}/category/test.output if
    +        the latter exists.
    +      

    - If you develop parts of deal.II, want to add something, or fix a - bug in it, we encourage you to use our testsuite. This page - documents some aspects of it. + Note: Specifying these options via environment variables is + volatile, i.e. if make setup_tests is invoked a second + time without the variables set in environment, the option will be + reset to the default value. If you want to set these options + permanently, set them via cmake as CMake variable in the build + directory: +

    +
    +    $ cmake -DTEST_PICKUP_REGEX="<regular expression>" .
    +      
    + A variable set via cmake always overrides one + set via environment.

    + +

    Running the testsuite

    + +

    + The testsuite can now be run in the build directory via +

     
    -    

    Running it

    + $ ctest [-j N] +
    + Here, N is the number of concurrent tests that should be + run, in the same way as you can say make -jN. The testsuite + is huge and will need around 12h on current computers + running single threaded. +

    - To run the testsuite, go to the directory where you want to test deal.II - and do this: -

    +      If you only want to run a subset of tests
    +      matching a regular expression, or if you want to exclude tests matching
    +      a regular expression, you can use
    +      
     
    -       svn checkout https://svn.dealii.org/trunk/tests
    -       cd tests
    -       DEAL_II_DIR=/a/b/c ./configure
    -    
    - where /a/b/c is the installation directory you have told - CMake to install deal.II into previously. + $ ctest [-j N] -R '<positive regular expression>' + $ ctest [-j N] -E '<negative regular expression>' +
    +

    + +

    + Note: + Not all tests succeed on every machine even if all computations are + correct, because your machine generates slightly different floating + point outputs. To increase the number of tests that work correctly, + install the + numdiff tool that compares + stored and newly created output files based on floating point + tolerances. To use it, simply export where the numdiff + executable can be found via the PATH + environment variable so that it can be found during + make setup_tests.

    + +

    How to interpret the output

    +

    - Not all tests succeed on every machine even if all computations are - correct, because you might not have configured with all the required - packages (for example PETSc or Trilinos), or because your machine - generates slightly different floating point outputs. To increase the - number of tests that work correctly, install the - numdiff toold that compares - stored and newly created output files based on floating point - tolerances. To use it, simply export the environment variable - export DEAL_II_DIFF="numdiff -a 1e-6 -q" - before running the testsuite. + A typical output of a ctest invocation looks like: +

    +
    +    $ ctest -j4 -R "base/thread_validity"
    +    Test project /tmp/trunk/build
    +          Start 747: base/thread_validity_01.debug
    +          Start 748: base/thread_validity_01.release
    +          Start 775: base/thread_validity_05.debug
    +          Start 776: base/thread_validity_05.release
    +     1/24 Test #776: base/thread_validity_05.release ...   Passed    1.89 sec
    +     2/24 Test #748: base/thread_validity_01.release ...   Passed    1.89 sec
    +          Start 839: base/thread_validity_03.debug
    +          Start 840: base/thread_validity_03.release
    +     3/24 Test #747: base/thread_validity_01.debug .....   Passed    2.68 sec
    +    [...]
    +          Start 1077: base/thread_validity_08.debug
    +          Start 1078: base/thread_validity_08.release
    +    16/24 Test #1078: base/thread_validity_08.release ...***Failed    2.86 sec
    +    18/24 Test #1077: base/thread_validity_08.debug .....***Failed    3.97 sec
    +    [...]
    +
    +    92% tests passed, 2 tests failed out of 24
    +
    +    Total Test time (real) =  20.43 sec
    +
    +    The following tests FAILED:
    +            1077 - base/thread_validity_08.debug (Failed)
    +            1078 - base/thread_validity_08.release (Failed)
    +    Errors while running CTest
    +      
    + If a test failed (like base/thread_validity_08.debug in above + example output), you might want to find out what exactly went wrong. To + this end, you can search + through Testing/Temporary/LastTest.log for the exact output + of the test, or you can rerun this one test, specifying -V + to select verbose output of tests: +
    +
    +    $ ctest -V -R "base/thread_validity_08.debug"
    +    [...]
    +    test 1077
    +        Start 1077: base/thread_validity_08.debug
    +
    +    1077: Test command: [...]
    +    1077: Test timeout computed to be: 600
    +    1077: Test base/thread_validity_08.debug: RUN
    +    1077: ===============================   OUTPUT BEGIN  ===============================
    +    1077: Built target thread_validity_08.debug
    +    1077: Generating thread_validity_08.debug/output
    +    1077: terminate called without an active exception
    +    1077: /bin/sh: line 1: 18030 Aborted [...]/thread_validity_08.debug
    +    1077: base/thread_validity_08.debug: BUILD successful.
    +    1077: base/thread_validity_08.debug: RUN failed. Output:
    +    1077: DEAL::OK.
    +    1077: gmake[3]: *** [thread_validity_08.debug/output] Error 1
    +    1077: gmake[2]: *** [CMakeFiles/thread_validity_08.debug.diff.dir/all] Error 2
    +    1077: gmake[1]: *** [CMakeFiles/thread_validity_08.debug.diff.dir/rule] Error 2
    +    1077: gmake: *** [thread_validity_08.debug.diff] Error 2
    +    1077:
    +    1077:
    +    1077: base/thread_validity_08.debug: ******    RUN failed    *******
    +    1077:
    +    1077: ===============================    OUTPUT END   ===============================
    +      
    + So this specific test aborted in the RUN stage.

    - Once you have done this, you may simply type - make. This runs all the tests there are, but stops at - the first one that fails to either execute properly or for which - the output does not match the expected output found in the subversion - archive. This is helpful if you want to figure out if any test is - failing at all. Typical output looks like this: -

    +      The general output for a successful test <test> in
    +      category <category> for build type
    +      <build> is
    +      
     
    -      deal.II/tests> make
    -      cd base ; make
    -      make[1]: Entering directory `/ices/bangerth/p/deal.II/1/deal.II/tests/base'
    -      =====linking======= logtest.exe
    -      =====Running======= logtest.exe
    -      =====Checking====== logtest.output
    -      =====OK============ logtest.OK
    -      =====linking======= reference.exe
    -      =====Running======= reference.exe
    -      =====Checking====== reference.output
    -      =====OK============ reference.OK
    -      =====linking======= quadrature_test.exe
    -      ...
    -    
    - Be aware that because of the number of tests we have, running the entire - testsuite takes approximately 10 hours (as of early 2013), even on a fast - system. (On the other hand, of couse only a large testsuite can offer - comprehensive coverage of a software as big as deal.II.) This time can be - reduced, however, on multicore machines if you use the command - make -jN where N is an integer equal to or - slightly larger than the number of processor cores you have, as this - instructs make to run several tests at the same time. -

    - -

    - Sometimes, you know that for whatever reason one test - always fails on your system, or has already failed before you made - any changes to the library that could have caused tests to - fail. We also sometimes check in tests that we know presently - fail, just to remind us that we need to work on a fix, if we don't - have the time to debug the problem properly right away. In this - case, you will not want the testsuite to stop at the first test - that fails, but will want to run all tests first and then inspect - the output to find any fails. There are make targets for this - as well. The usual way we use the testsuite is to run all tests - like this - (the same applies as above: make -jN can be used on multicore - machines): -

    +    xx: Test <category>/<test>.<build>: PASSED
    +    xx: ===============================   OUTPUT BEGIN  ===============================
    +    xx: [...]
    +    xx: <category>/<test>.<build>: PASSED.
    +    xx: ===============================    OUTPUT END   ===============================
    +      
    + And for a test that fails in stage <stage>: +
     
    -      deal.II/tests> make report | tee report
    -    
    - which produces the file report ( here in the test directory a-framework) -
    +    xx: Test <category>/<test>.<build>: <stage>
    +    xx: ===============================   OUTPUT BEGIN  ===============================
    +    xx: [...]
    +    xx: <category>/<test>.<build>: <stage> failed. [...]
    +    xx:
    +    xx: <category>/<test>.<build>: ******    <stage> failed    *******
    +    xx: ===============================    OUTPUT END   ===============================
    +      
    + Hereby, <stage> indicates the stage in which the + test failed: +
      +
    • + CONFIGURE: only for test in the "build_tests" + category: The test project failed in the configuration stage +
    • +
    • + BUILD: compilation error occured +
    • +
    • + RUN: the test executable could not be run / aborted +
    • +
    • + DIFF: the test output differs from the reference output +
    • +
    • + PASSED: the test run successful +
    • +
    + Typically, tests fail because the output has changed, and you will see + this in the DIFF phase of the test. +

    - =====Checking====== miscompare/output - +++++Error+++++++++ miscompare/OK (miscompare/cmp/generic) Use make verbose=on for the diffs - =====linking======= compile/exe - =====Running======= link/exe - =====debug========= fail.cc - make[1]: Leaving directory `/home/kanschat/deal/tests/a-framework' - Revision: 21455 - Date: 2010 187 2010-07-06 27-2 - Id: kanschat@odin - 2010-07-06 16:39 1 a-framework/compile - 2010-07-06 16:39 0 a-framework/fail - 2010-07-06 16:39 2 a-framework/link - 2010-07-06 16:39 3 a-framework/miscompare - 2010-07-06 16:39 + a-framework/run -
    - The last lines are the ones we are looking for: they show the time at which - the tests was run, an indicator of success, and the name of a - test. The indicator is either a plus, which means that the test - compiled and linked successfully and that the output compared - successfully against the stored results. Otherwise, it is any of the - numbers 0 to 3, indicating failure at different levels: -
      -
    • 0: compiling failed -
    • 1: linking failed -
    • 2: the program crashed -
    • 3: output differs from stored result -
    • +: test succeeded -
    - If you only want to see the tests that failed, after the previous command, - issue -
     
    -      grep -v + report
    -    
    + +

    Testsuite development

    + +

    + The following outlines what you need to know if you want to understand + how the testsuite actually works, for example because you may want to + add tests along with the functionality you are currently developing.

    + + + +

    General layout

    +

    - If you want to do a little more than just that, you should - consider running -

    +      A test usually consists of a source file and an output file for
    +      comparison (under the testsuite directory tests):
    +      
     
    -      make report+mail | tee report
    -    
    - instead. This does all the same stuff, but also mails the test - result to our central mail result server which will in regular - intervals (at least once a day) munge these mails and present them - on our test site. This way, people can - get an overview of what tests fail. You may even consider running - tests nightly through a cron-job with this command, to have - regular test runs. + category/test.cc + category/test.output +
    + category will be one of the existing subdirectory + under tests/, e.g., lac/, base/, + or mpi/. Historically, we have grouped tests into the + directories base/, lac/, deal.II/ depending on their + functionality, and bits/ if they were small unit tests, but + in practice we have not always followed this rigidly. There are also + more specialized directories trilinos/, petsc/, + serialization/, mpi/ etc, whose meaning is more obvious. + test.cc must be a regular executable (i.e. having an + int main() routine). It will be compiled, linked and + run. The executable should not output anything to cout + (at least under normal circumstances, i.e. no error condition), + instead the executable should output to a file output + in the current working directory. In practice, we rarely write the + source files completely from scratch, but we find an existing test that + already does something similar and copy/modify it to fit our needs.

    +

    + For a normal test, ctest will typically run the following 3 + stages: +

      +
    • + BUILD: The build stage generates an executable in + BUILD_DIR/tests/<category>/<test>. +
    • +
    • + RUN: The run stage then invokes the executable in the + directory where it is located. By convention, each test puts its + output into a file simply called output, which will + then be located in + BUILD_DIR/tests/<category>/<test>/output. + If the run fails (e.g. because the program aborts with an error + code) the file output is renamed to + failing_output. +
    • +
    • + DIFF: As a last stage the generated output file will + be compared to + SOURCE_DIR/tests/<category>/<test>[...].output. + and stored in + BUILD_DIR/tests/<category>/<test>/diff. + If the diff fails the file diff is renamed to + failing_diff. +
    • +
    +

    + + + +

    Restricting tests for build configurations

    - To get a quick overview you can run -

    +      Comparison file can actually be named in a more complex way than
    +      just category/test.output:
    +      
     
    -      make report+summary
    -    
    - instead. This runs all the tests and outputs a table in the following format - at the end: -
    +    category/test.[with_<feature>=<on|off>.]*[mpirun=<x>.][expect=<y>.][<debug|release>.]output
    +      
    + Normally, a test will be set up so that it runs twice, once in debug and + once in release configuration. + If a specific test can only be run in debug or release configurations but + not in both it is possible to restrict the setup by prepeding + .debug or .release directly before + .output, e.g.: +
     
    -                Compiling Linking Running   Check      OK     all
    -         a-framework	1	1	1	1	1	5
    -                base	0	0	0	2	185	187
    -                 lac	0	0	0	0	117	117
    -                  fe	0	0	0	4	114	118
    -             deal.II	0	0	0	2	291	293
    -         integrators	0	0	0	0	15	15
    -           multigrid	0	0	0	0	35	35
    -		 ...
    -    
    + category/test.debug.output +
    + This way, the test will only be set up to build and run against the debug + library. If a test should run in both configurations but, for some + reason, produces different output (e.g., because it triggers an + assertion in debug mode), then you can just provide two different output + files: +
    +
    +    category/test.debug.output
    +    category/test.release.output
    +      

    + + +

    Restricting tests for feature configurations

    - If a test failed, you have to find out what exactly went - wrong. For this, you will want to go into the directory of that - test, and figure out in more detail what went wrong. For example, - if above test hierarchical would have failed, you - would want to go into the base directory (this is - given in the line with the equals signs; there are tests in other - directories as well) and then type -

    +      In a similar vain as for build configurations, it is possible to restrict
    +      tests to specific feature configurations, e.g.:
    +      
     
    -      make hierarchical/exe
    -    
    - to compile and link the executable. (For each test there is a not - only a file with suffic .cc but also a subdirectory with the - same name, in which we store among other things the executable for that - test, under the name exe.) If this fails, i.e. if - you can't compile or link, then you probably already know where - the problem is, and how to fix it. If you could compile and link - the test, you will want to make sure that it executes correctly - and produces an output file: -
    +    category/test.with_umfpack=on.output, or
    +    category/test.with_zlib=off.output
    +      
    + These tests will only be set up if the specified feature was configured. + It is possible to provide different output files for disabled/enabled + features, e.g. +
     
    -      make hierarchical/output
    -    
    - (As you see, the output file is also stored in the subdirectory with the - test's name.) If this produces errors or triggers assertions, then you will - want to use a debugger on the executable to figure out what happens. On - the other hand, if you are sure that this also worked, you will - want to compare the output with the stored output from subversion: -
    +    category/test.with_64bit_indices=on.output
    +    category/test.with_64bit_indices=off.output
    +      
    + It is also possible to declare multiple constraints subsequently, e.g. +
     
    -      make hierarchical/OK
    -    
    - If the output isn't equal, then you'll see something like - this: -
    +    category/test.with_umfpack=on.with_zlib=on.output
    +      
    +

    +

    + Note: The tests in some subdirectories of tests/ are + automatically run only if some feature is enabled. In this case a + feature constraint encoded in the output file name is + redundant and should be avoided. In particular, this holds for + subdirectories + distributed_grids, lapack, + metis, petsc, slepc, + trilinos, umfpack, gla, and + mpi +

    - =====Checking====== hierarchical/output - +++++Error+++++++++ hierarchical/OK. Use make verbose=on for the diffs -
    - Because the diffs between the output we get and the output we - expected can sometimes be very large, you don't get to see it by - default. However, following the suggestion printed, if you type -
     
    -      make hierarchical/OK verbose=on
    -    
    - you get to see it all: -
    +    
    +    

    Running tests with MPI

    +

    + If a test should be run with MPI in parallel, the number of MPI + processes N with which a program needs to be run for + comparison with a given output file is specified as follows: +

     
    -      =====Checking====== hierarchical/output
    -      12c12
    -      < DEAL::0.333 1.667 0.333 -0.889 0.296 -0.988 0.329 -0.999 0.333 -1.000 0.333 -1.000
    -      ---
    -      > DEAL::0.333 0.667 0.333 -0.889 0.296 -0.988 0.329 -0.999 0.333 -1.000 0.333 -1.000
    -      +++++Error+++++++++ hierarchical/OK
    -    
    - In this case, the second number on line 12 is off by one. To find - the reason for this, you again should use a debugger or other - suitable means, but that of course depends on what changes you - have made last and that could have caused this discrepancy. + category/test.mpirun=N.output +
    + It is quite typical for an MPI-enabled test to have multiple output + files for different numbers of MPI processes. +

    + + +

    Changing condition for success

    +

    + Normally a test is considered to be successful if all test stages + could be run and the test reached the PASSED stage (see + the output description section for details). + If (for some reason) the test should succeed ending at a specific + test stage different than PASSED you can specify it via + expect=<stage>, e.g.: +

    +
    +    category/test.expect=run.output
    +      

    +

    Adding new tests

    - As mentioned above, we add a new test every - time we add new functionality to the library or fix a bug. If you - want to contribute code to the library, you should do this - as well. Here's how: you need a testcase, - a subdirectory with the same name as the test, and a file with the - expected output. + We typically add one or more new tests every + time we add new functionality to the library or fix a bug. If you + want to contribute code to the library, you should do this + as well. Here's how: you need a testcase and a file with the + expected output.

    The testcase

    - For the testcase, we usually start from a template like this: + For the testcase, we usually start from one of the existing tests, copy + and modify it to where it does what we'd like to test. Alternatively, + you can also start from a template like this:

     
     // ---------------------------------------------------------------------
    @@ -380,15 +570,15 @@
     // a short (a few lines) description of what the program does
     
     #include "../tests.h"
    -#include 
    -#include 
    +#include <iostream>
    +#include <fstream>
     
     // all include files you need here
     
     
     int main ()
     {
    -  std::ofstream logfile("my_new_test/output");
    +  std::ofstream logfile("output");
       deallog.attach(logfile);
       deallog.depth_console(0);
     
    @@ -400,17 +590,14 @@ int main ()
     }
         
    -

    You open an output file in a directory with the same - name as your test, and then write - all output you generate to it, - through the deallog stream. The deallog - stream works like any - other std::ostream except that it does a few more - things behind the scenes that are helpful in this context. In - above case, we only write a zero to the output - file. Most tests actually write computed data to the output file - to make sure that whatever we compute is what we got when the - test was first written. +

    This code opens an output file output in the current working + directory and then writes all output you generate to it, through the + deallog stream. The deallog stream works like + any other std::ostream except that it does a few more + things behind the scenes that are helpful in this context. In above + case, we only write a zero to the output file. Most tests of course + write computed data to the output file to make sure that whatever we + compute is what we got when the test was first written.

    @@ -419,181 +606,220 @@ int main () have traditionally been into the base/, lac/, deal.II/, fe/, hp/, or multigrid/ directories, depending on - where the classes that are tested are located. + where the classes that are tested are located. More atomic tests often go + into bits/. There are also + directories for PETSc and Trilinos wrapper functionality.

    +

    An expected output

    +

    - We have started to create more atomic tests which - are usually very small and test only a single aspect of the - library, often only a single function. These tests go into the - bits/ directory and often have names that are - composed of the name of the class being tested and a two-digit - number, e.g., dof_tools_11. There are - directories for PETSc and Trilinos wrapper functionality. -

    + In order to run your new test, copy it to an appropriate category and + create an empty comparison file for it: +
     
    -    

    A directory with the same name as the test

    + category/my_new_test.cc + category/my_new_test.output +
    + Now, rerun +
     
    -    

    You have to create a subdirectory - with the same name as your test to hold the output from the test. + $ make setup_tests +

    + so that your new test is picked up. After that it is possible to + invoke it with +
     
    -    

    One convenient way to create this subdirectory with the correct - properties is to use svn copy. -

    +    $ ctest -V -R "category/my_new_test"
    +      
    +

    - svn copy existing_test_directory my_new_test -
    +

    + If you run your new test executable this way, the test should compile + and run successfully but fail in the diff stage (because of the empty + comparison file). You will get an output file + BUILD_DIR/category/my_new_test/output. Take a look at it to + make sure that the output is what you had expected. (For complex tests, + it may sometimes be impossible to say whether the output is correct, and + in this case we sometimes just take it to make + sure that future invokations of the test yield the same results.) +

    - Once you have done this, you can try to run -

    +      The next step is to copy and rename this output file to the source
    +      directory and replace the original comparison file with it:
    +      
     
    -      make my_new_test/output
    -    
    - This should compile, link, and run your test. Running your test - should generate the desired output file. -

    + category/my_new_test.output +
    + At this point running the test again should be successful: +
     
    +    $ ctest -V -R "category/my_new_test"
    +      
    +

    -

    An expected output

    +

    Checking in

    - If you run your new test executable, you will get an output file - mytestname/output that should be used to compare all future - runs with. If the test - is relatively simple, it is often a good idea to look at the - output and make sure that the output is actually what you had - expected. However, if you do complex operations, this may - sometimes be impossible, and in this case we are quite happy with - any reasonable output file just to make sure that future - invokations of the test yield the same results. -

    + Tests are a way to make sure everything keeps working. If they + aren't automated, they are no good. We are therefore very + interested in getting new tests. If you have subversion write access + already, you can add the new test and the expected output + file: +
     
    -    

    - The next step is to copy this output file to the place where the - scripts can find it when they compare with newer runs. For this, you first - have to understand how correct results are verified. It works in the - following way: for each test, we have subdirectories - testname/cmp where we store the expected results in a file - testname/cmp/generic. If you create a new test, you should - therefore create this directory, and copy the output of your program, - testname/output to testname/cmp/generic. + svn add category/my_new_test.cc + svn add category/my_new_test.output + svn commit -m "New test" +

    + If you don't have subversion write access, talk to us in the + discussion group; writing testcases is a worthy and laudable task, + and we would like to encourage it by giving people the opportunity to + contribute!

    -

    - Why generic? The reason is that sometimes test results - differ slightly from platform to platform, for example because numerical - roundoff is different due to different floating point implementations on - different CPUs. What this means is that sometimes a single stored output is - not enough to verify that a test functioned properly: if you happen to be - on a platform different from the one on which the generic output was - created, your test will always fail even though it produces almost exactly - the same output. -

    + + + +

    Submitting test results

    - To avoid this, what the makefiles do is to first check whether an output - file is stored for this test and your particular configuration (platform - and compiler). If this isn't the case, it goes through a hierarchy of files - with related configurations, and only if none of them does it take the - generic output file. It then compares the output of your test run with the - first file it found in this process. To make things a bit clearer, if you - are, for example, on a i686-pc-linux-gnu box and use - gcc4.0 as your compiler, then the following files will be - sought (in this order): -

    +      To submit test results to our CDash
    +      instance just invoke ctest within a build directory (or designated
    +      build directory) with the -S option pointing to the
    +      run_testsuite.cmake script: 
     
    -testname/cmp/i686-pc-linux-gnu+gcc4.0
    -testname/cmp/i686-pc-linux-gnu+gcc3.4
    -testname/cmp/i686-pc-linux-gnu+gcc3.3
    -testname/cmp/generic
    -    
    - (This list is generated by the tests/hierarchy.pl script.) - Your output will then be compared with the first one that is actually - found. The virtue of this is that we don't have to store the output files - from all possible platforms (this would amount to gigabytes of data), but - that we only have store an output file for gcc4.0 if it differs from that - of gcc3.4, and for gcc3.4 if it differs from gcc3.3. If all of them are the - same, we would only have the generic output file. + $ ctest [...] -V -S ../tests/run_testsuite.cmake +
    + The script will run configure, build and ctest and submit the results + to the CDash server. It does not matter whether the configure, build + or ctest stages were run before that. Also in script mode, you can + specify the same options for ctest as explained above.

    - Most of the time, you will be able to generate output files only - for your own platform and compiler, and that's alright: someone - else will create the output files for other platforms - eventually. You only have to copy your output file to - testname/cmp/generic. + Note: The default output in script mode is very minimal. + Therefore, it is recommended to specify -V which will + give the same level of verbosity as the non-script mode.

    - At this point you can run -

    +      Note: The following variables can be set to via
    +      
     
    -      make my_new_test/OK
    -    
    - which should compare the present output with what you have just - copied into the compare directory. This should, of course, - succeed, since the two files should be identical. + ctest -D<variable>=<value> [...] +
    + to control the behaviour of the run_testsuite.cmake + script: +
    +
    +    CTEST_SOURCE_DIRECTORY
    +      - The source directory of deal.II (usually ending in "[...]/deal.II"
    +        (equivalent to https://svn.dealii.org/trunk/deal.II)
    +        Note: This is _not_ the test directory ending in "[...]/tests"
    +      - If unspecified, "../deal.II" and "../../$ relative to the location
    +        of this script is used. If this is not a source directory, an error
    +        thrown.
    +
    +    CTEST_BINARY_DIRECTORY
    +      - The designated build directory (already configured, empty, or non
    +        existent - see the information about TRACKs what will happen)
    +      - If unspecified the current directory is used. If the current
    +        directory is equal to CTEST_SOURCE_DIRECTORY or the "tests"
    +        directory, an error is thrown.
    +
    +    CTEST_CMAKE_GENERATOR
    +      - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see
    +        $ man cmake)
    +      - If unspecified the current generator of a configured build directory
    +        will be used, otherwise "Unix Makefiles".
    +
    +    TRACK
    +      - The track the test should be submitted to. Defaults to "Experimental".
    +        Possible values are:
    +
    +        "Experimental"     - all tests that are not specifically "build" or
    +                             "regression" tests should go into this track
    +
    +        "Build Tests"      - Build tests that configure and build in a
    +                             clean directory and run the build tests
    +                             "build_tests/*"
    +
    +        "Nightly"          - Reserved for nightly regression tests for
    +                             build bots on various architectures
    +
    +        "Regression Tests" - Reserved for the regression tester
    +
    +    CONFIG_FILE
    +      - A configuration file (see docs/development/Config.sample)
    +        that will be used during the configuration stage (invokes
    +        $ cmake -C ${CONFIG_FILE}). This only has an effect if
    +        CTEST_BINARY_DIRECTORY is empty.
    +      
    + Furthermore, the variables described above can also be + set and will be handed automatically down to cmake.

    -

    - On the other hand, if you realize that an existing test fails on your - system, but that the differences (as shown when running with - verbose=on, see above) are only marginal and around the 6th or - 8th digit, then you should check in your output file for the platform you - work on. For this, you could copy testname/output to - testname/cmp/myplatform+compiler, but your life can be easier - if you simply type -

     
    -      make my_new_test/ref
    -    
    - which takes your output and copies it to the right place automatically. -

    + +

    Build tests

    +

    + Build tests are used to check that deal.II can be compiled on + different systems and with different compilers as well as + different configuration options. Results are collected in the "Build + Tests" track in CDash.

    +

    Running the build test suite is simple and we encourage deal.II + users with configurations not found on the test suite page to + participate. Assuming you checked out deal.II into the directory + deal.II, running it is as simple as: +

     
    -    

    Checking in

    + cd deal.II + mkdir build + cd build + ctest -j4 -S ../cmake/scripts/run_buildtest.cmake +
    +

    - Tests are a way to make sure everything keeps working. If they - aren't automated, they are no good. We are therefore very - interested in getting new tests. If you have subversion write access - already, you can add the new test and the expected output - file: -

    +      What this does is to compile and build deal.II in the directory
    +      build, try to configure, build (and run a subset) of all
    +      tutorial programs supported by the current configuration and send the
    +      results to the CDash instance.
    +    

    - svn add bits/my_new_test.cc - svn add bits/my_new_test - svn add bits/my_new_test/cmp - svn add bits/my_new_test/cmp/generic - svn commit -m "New test" bits/my_new_test* -
    - In addition, you should do the following in order to avoid that the files - generated while running the testsuite show up in the output of svn - status commands: -
    +    

    + Note: Build tests require the designated build directory to be + completely empty and the source directory to be under subversion + version control. If you want to specify a build configuration for + cmake use a configuration file + to preseed the cache as explained above: +

     
    -      svn propset svn:ignore "obj.*
    -        exe
    -        output
    -        status
    -        OK" bits/my_new_test
    -      svn commit -m "Ignore generated files." bits/my_new_test
    -    
    - Note that the list of files given in quotes to the propset command extends - over several lines. + $ ctest -DCONFIG_FILE="[...]/Config.sample" [...] +

    + + + +

    Dedicated build tests

    +

    - If you don't have subversion write access, talk to us in the discussion group; - writing testcases is a worthy and laudable task, and we would - like to encourage it by giving people the opportunity to - contribute! + Build tests work best if they run automatically and periodically. + There is a detailed example for such dedicated build tests on the wiki.

    +
    The deal.II Authors diff --git a/deal.II/doc/license.html b/deal.II/doc/license.html index dac21d73d7..96d18b2cfc 100644 --- a/deal.II/doc/license.html +++ b/deal.II/doc/license.html @@ -18,7 +18,7 @@

    The deal.II library has been placed under an Open Source license, in the sense advocated by the Open Source + href="http://opensource.org" target="_top">Open Source Initiative. You are thus free to copy and use it, and you have free access to all source code.

    diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 54d0a2412b..42be735793 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -24,6 +24,23 @@ inconvenience this causes.

      +
    1. + Changed: The ghost handling of the parallel::distributed::Vector class has + been reworked: The vector now carries a global state that stores whether + ghost elements have been updated or not. If a vector has ghost elements, it + does not allow calls to compress() any more. Instead, a compress operation + can now only be done when the ghost entries have been cleared before by + calling zero_out_ghosts() or operator=0. The state can be queried by the new + method has_ghost_elements(). This change avoids spurious entries to be + inserted with compress(), but requires some change in user codes. The + behavior of a ghosted vector is now very similar to ghosted PETSc and + Trilinos vectors. The only difference is that the same vector can + also be used as a non-ghosted vector which is designed for use in assembly + routines. +
      + (Martin Kronbichler, 2013/10/18) +
    2. +
    3. Removed: GridTools::collect_periodic_face_pairs. This function is superseded by GridTools::collect_periodic_faces which exports an @@ -61,6 +78,12 @@ inconvenience this causes.
        +
      1. New: The testsuite is now ported to + CMake and uses CTest as test driver. +
        + (Wolfgang Bangerth, Timo Heister, Matthias Maier, Bruno Turcksin, 2013/10/20) +
      2. +
      3. Changed: multithreadinfo::n_default_threads is now deprecated. Use the new n_threads() function instead, which works correctly with TBB. @@ -145,6 +168,30 @@ inconvenience this causes.

        Specific improvements

          +
        1. + ~Subscriptor and ~GrowingVectorMemory no longer throw an exception (the + former if disable_abort_on_exception was called) to be compatible with the + C++11 standard which otherwise requires the program to immediately call + std::terminate. This was done with a new macro "AssertNothrow". +
          + (Wolfgang Bangerth, Matthias Maier, Bruno Turcksin 2013/10/22) +
        2. + +
        3. + dealii::SolverControl::NoConvergence now inherits dealii::ExceptionBase and + is thrown via AssertThrow(false, ... ). +
          + (Matthias Maier, 2013/10/20) +
        4. + +
        5. + New: parallel::distributed::BlockVector has now methods update_ghost_values, + compress, set_out_ghosts, and has_ghost_elements that do the respective + operation on each block of parallel::distributed::Vector. +
          + (Martin Kronbichler, 2013/10/18) +
        6. +
        7. Fixed: When deriving from DataOut to filter the cells where output is generated, there were two different bugs that result in segmentation faults or wrong cells written (example, step-18).
          diff --git a/deal.II/doc/news/news.html b/deal.II/doc/news/news.html index 9fa47a1f14..cfdbd129bc 100644 --- a/deal.II/doc/news/news.html +++ b/deal.II/doc/news/news.html @@ -557,7 +557,7 @@
          The principal authors of deal.II—Wolfgang Bangerth, Ralf Hartmann and Guido Kanscht—have received the J. H. Wilkinson + href="http://www.mcs.anl.gov/WilkinsonPrize/">J. H. Wilkinson Prize for Numerical Software for their creation of and work on the deal.II library. The prize committee particularly noted the reliability and usability of the software and the quality of the @@ -905,7 +905,7 @@ Library (HSL)
          - The Harwell Subroutine Library (HSL) is a library that, among much other functionality, offers some sparse direct solvers. We have added support for an diff --git a/deal.II/doc/publications/index.html b/deal.II/doc/publications/index.html index 73bc2acfd7..e7aa5b43a4 100644 --- a/deal.II/doc/publications/index.html +++ b/deal.II/doc/publications/index.html @@ -107,7 +107,7 @@
        8. W. Bangerth, - T. Heister and A finite basis grid analysis of the Hartree-Fock wavefunction method for one- and two-electron atoms
          - AIP Conf. Proc., Accepted, 2013. + AIP Conf. Proc., vol. 1558, pp. 1524, 2013.
        9. M. Anderson, W. Bangerth, G. Carey + target="_top">W. Bangerth, G. Carey
          Analysis of parameter sensitivity and experimental design for a class of nonlinear partial differential @@ -4183,7 +4181,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with J. Sci. Comput., vol. 24, pp. 321-341, 2005
          (This paper uses AFEPack which in turn uses deal.II's linear algebra library.)
        10. @@ -4233,8 +4231,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with Ph.D. thesis, University of Twente, The Netherlands, 2005 -
        11. R. B. Schulz, G. Echner, H. Ruehle, +
        12. R. B. Schulz, G. Echner, H. Ruehle, W. Stroh, J. Vierling, T. Vogt, J. Peter, W. Semmler
          Development of a fully rotational non-contact fluorescence tomographer @@ -4246,7 +4243,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with
        13. -
        14. R. B. Schulz, J. Peter, W. Semmler, C. D'andrea, G. Valentini, R. Cubeddu +
        15. R. B. Schulz, J. Peter, W. Semmler, C. D'andrea, G. Valentini, R. Cubeddu
          Quantifiability and Image Quality in Noncontact Fluorescence Tomography @@ -4298,8 +4295,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with
        16. -
        17. G. Carey, M. Anderson, B. Carnes, B. Kirk +
        18. G. Carey, M. Anderson, B. Carnes, B. Kirk
          Some aspects of adaptive grid technology related to boundary and interior layers @@ -4309,8 +4305,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with pp. 55-86, 2004
        19. -
        20. G. Carey, W. Barth, J. A. Woods, B. Kirk, +
        21. G. Carey, W. Barth, J. A. Woods, B. Kirk, M. Anderson, S. Chow, W. Bangerth
          @@ -4416,10 +4411,8 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with Modelling Simul. Mater. Sci. Eng., vol. 12, pp. 1293-1306, 2004
        22. -
        23. R. B. - Schulz, R. B. + Schulz, W. Bangerth, J. Peter, W. Semmler
          Independent modeling of @@ -5028,7 +5021,7 @@ A Goal Oriented Software Library for Solving PDEs and Optimization Problems with
          - The deal.II Authors + The deal.II Authors
          diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html index 15ff24a35d..3a10fc35e4 100644 --- a/deal.II/doc/readme.html +++ b/deal.II/doc/readme.html @@ -78,22 +78,17 @@ platforms:

          +

          Most other combinations of POSIX-style operating systems and C++ Standard compliant compilers should also work. If they don't, @@ -147,11 +142,11 @@

        24. The library generates output in formats readable by - GNUPLOT, - GMV + GNUPLOT, + GMV (general mesh viewer), - Tecplot (ASCII and binary), - Tecplot (ASCII and binary), + Visualization Toolkit (Vtk), AVS Explorer, Open DX, @@ -168,7 +163,7 @@ of excellent programs that can read vtk and vtu, such as Visit, - ParaView, + ParaView, as well as others. Povray is freely available for almost all platforms. AVS is a commercial program available for most Unix flavors. Tecplot is a commercial program available for Windows @@ -282,7 +277,7 @@ possibly with different arguments. However, this sometimes leads to surprising results and you may not get exactly what you were hoping for. For more information, - see here. + see here.

        25. diff --git a/deal.II/doc/screen.css b/deal.II/doc/screen.css index 51bfd69bac..e840e05ddd 100644 --- a/deal.II/doc/screen.css +++ b/deal.II/doc/screen.css @@ -118,30 +118,27 @@ h1, h2, h3, h4, h5, h6 { border-bottom: 1px solid #aaaaaa; } -h1 { - font-size: 175%; - counter-reset: section; -} +h1 { font-size: 175%; + counter-reset: section; } -h2 { - font-size: 150%; - counter-reset: subsection; -} +h2 { font-size: 150%; + padding-top: 1.5em; + counter-reset: subsection; } h3 { font-size: 140%; - padding-top: 1.5em; + padding-top: 0.5em; padding-bottom: 0.17em; border-bottom: 1px dashed #aaaaaa; } -h4 { font-size: 110%; +h4 { font-size: 110%; border-bottom: none; font-weight: bold; } -h5 { font-size: 100%; +h5 { font-size: 100%; border-bottom: none; font-weight: bold; } -h6 { font-size: 80%; +h6 { font-size: 80%; border-bottom: none; font-weight: bold; } diff --git a/deal.II/doc/users/Config.sample b/deal.II/doc/users/Config.sample index df14dc07d3..06b915700b 100644 --- a/deal.II/doc/users/Config.sample +++ b/deal.II/doc/users/Config.sample @@ -1,8 +1,8 @@ ## ## -# Example configuration file # +# Example configuration file # # # -# See doc/readme.html and doc/development/cmake.html for further # -# details on how to use the cmake build system of deal.II. # +# See doc/readme.html and doc/users/cmake.html for further # +# details on how to use the cmake build system of deal.II. # ## ## @@ -75,6 +75,10 @@ # "Configure sensible default CFLAGS and CXXFLAGS depending on platform, compiler and build target." # ) # +# SET(DEAL_II_SETUP_COVERAGE OFF CACHE BOOL +# "Setup debug compiler flags to provide additional test coverage information. Currently only gprof is supported." +# ) +# # SET(CMAKE_CXX_COMPILER "" CACHE STRING # "CXX Compiler." # ) @@ -334,6 +338,9 @@ # SET(MPI_CXX_INCLUDE_PATH "include directory for mpi" CACHE STRING "") # SET(MPI_CXX_COMPILE_FLAGS "..." CACHE STRING "") # SET(MPI_CXX_LINK_FLAGS "..." CACHE STRING "") +# SET(MPI_VERSION "x.y" CACHE STRING "") +# SET(MPI_VERSION_MAJOR "x" CACHE STRING "") +# SET(MPI_VERSION_MINOR "y" CACHE STRING "") # # Additionally: # @@ -362,6 +369,10 @@ # SET(MUMPS_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(MUMPS_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(MUMPS_LINKER_FLAGS "..." CACHE STRING "") +# SET(MUMPS_VERSION "x.y.z" CACHE STRING "") +# SET(MUMPS_VERSION_MAJOR "x" CACHE STRING "") +# SET(MUMPS_VERSION_MINOR "y" CACHE STRING "") +# SET(MUMPS_VERSION_SUBMINOR "z" CACHE STRING "") # @@ -430,11 +441,11 @@ # SET(PETSC_FOUND TRUE CACHE BOOL "") # SET(PETSC_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(PETSC_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") -# SET(PETSC_VERSION "x.y.z." CACHE STRING "") +# SET(PETSC_VERSION "x.y.z.p" CACHE STRING "") # SET(PETSC_VERSION_MAJOR "x" CACHE STRING "") # SET(PETSC_VERSION_MINOR "y" CACHE STRING "") # SET(PETSC_VERSION_SUBMINOR "z" CACHE STRING "") -# SET(PETSC_VERSION_PATCH "" CACHE STRING "") +# SET(PETSC_VERSION_PATCH "p" CACHE STRING "") # SET(PETSC_WITH_MPI_UNI FALSE CACHE BOOL "") # @@ -456,11 +467,11 @@ # SET(SLEPC_FOUND TRUE CACHE BOOL "") # SET(SLEPC_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(SLEPC_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") -# SET(SLEPC_VERSION "x.y.z." CACHE STRING "") +# SET(SLEPC_VERSION "x.y.z.p" CACHE STRING "") # SET(SLEPC_VERSION_MAJOR "x" CACHE STRING "") # SET(SLEPC_VERSION_MINOR "y" CACHE STRING "") # SET(SLEPC_VERSION_SUBMINOR "z" CACHE STRING "") -# SET(SLEPC_VERSION_PATCH "" CACHE STRING "") +# SET(SLEPC_VERSION_PATCH "p" CACHE STRING "") # SET(SLEPC_WITH_MPI_UNI FALSE CACHE BOOL "") # @@ -487,6 +498,9 @@ # SET(TBB_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(TBB_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(TBB_WITH_DEBUGLIB TRUE CACHE BOOL "") +# SET(TBB_VERSION "x.y" CACHE STRING "") +# SET(TBB_VERSION_MAJOR "x" CACHE STRING "") +# SET(TBB_VERSION_MINOR "y" CACHE STRING "") # @@ -507,6 +521,7 @@ # SET(TRILINOS_FOUND TRUE CACHE BOOL "") # SET(TRILINOS_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(TRILINOS_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") +# SET(TRILINOS_VERSION "x.y.z" CACHE STRING "") # SET(TRILINOS_VERSION_MAJOR "x" CACHE STRING "") # SET(TRILINOS_VERSION_MINOR "y" CACHE STRING "") # SET(TRILINOS_VERSION_SUBMINOR "z" CACHE STRING "") @@ -537,6 +552,10 @@ # SET(UMFPACK_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "") # SET(UMFPACK_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "") # SET(UMFPACK_LINKER_FLAGS "..." CACHE STRING "") +# SET(UMFPACK_VERSION "x.y.z" CACHE STRING "") +# SET(UMFPACK_VERSION_MAJOR "x" CACHE STRING "") +# SET(UMFPACK_VERSION_MINOR "y" CACHE STRING "") +# SET(UMFPACK_VERSION_SUBMINOR "z" CACHE STRING "") # @@ -597,7 +616,7 @@ # -# Obnoxiously adavanced configuration about paths, install locations and +# Obnoxiously advanced configuration about paths, install locations and # names: # # SET(DEAL_II_PACKAGE_NAME "deal.II" CACHE STRING diff --git a/deal.II/doc/users/cmake.html b/deal.II/doc/users/cmake.html index 5524e0eda8..c4df8f5d04 100644 --- a/deal.II/doc/users/cmake.html +++ b/deal.II/doc/users/cmake.html @@ -33,6 +33,15 @@
        26. Shortcuts
      4. +
      5. Configuring and Building deal.II +
          +
        1. Primary build targets
        2. +
        3. Information about current configuration
        4. +
        5. Out-of-source versus in-source builds
        6. +
        7. CMake Generators
        8. +
        9. Installation
        10. +
        +
      6. Configuration options
        1. Feature configuration
        2. @@ -49,7 +58,7 @@
        3. Compiling only certain parts
        - +

        Operating cmake

        @@ -194,6 +203,235 @@ will be expanded to the full DEAL_II_COMPONENT_* variable name).

        + + + +

        Configuring and Building deal.II

        + +

        + This section provides some further details and advanced topics with + respect to configuration and building that is not covered in the README. +

        + + +

        Primary build targets

        + +

        The current list of primary build targets can be queried via + make info: +

        +
        +    ###
        +    #
        +    #  The following targets are available (invoke via $ make <target>):
        +    #
        +    #    all            - compiles the library and all enabled components
        +    #    clean          - removes all generated files
        +    #    install        - installs into CMAKE_INSTALL_PREFIX
        +    #    help           - prints a list of valid top level targets
        +    #    info           - prints this help message
        +    #
        +    #    edit_cache     - runs ccmake for changing (cached) configuration variables
        +    #                     and reruns the configure and generate phases of CMake
        +    #    rebuild_cache  - reruns the configure and generate phases of CMake
        +    #
        +    #    compat_files   - builds and installs the 'compat_files' component
        +    #    documentation  - builds and installs the 'documentation' component
        +    #    examples       - builds and installs the 'examples' component
        +    #    library        - builds and installs the 'library' component
        +    #    mesh_converter - builds and installs the 'mesh_converter' component
        +    #    parameter_gui  - builds and installs the 'parameter_gui' component
        +    #
        +    #    test           - runs a minimal set of tests
        +    #
        +    #    setup_test     - sets up the testsuite subprojects
        +    #    clean_test     - runs the 'clean' target in every testsuite subproject
        +    #    prune_test     - removes all testsuite subprojects
        +    #
        +    ###
        +      
        + + + +

        Information about current configuration

        + +

        + A configuration run of cmake (or ccmake) + writes a short summary of the current configuration into + CMAKE_BUILD_DIR/summary.log: +

        +
        +    ###
        +    #
        +    #  deal.II configuration:
        +    #        CMAKE_BUILD_TYPE:       DebugRelease
        +    #        BUILD_SHARED_LIBS:      ON
        +    #        CMAKE_INSTALL_PREFIX:   /tmp/deal.II/install
        +    #        CMAKE_SOURCE_DIR:       /tmp/deal.II/deal.II (Version 8.1.pre)
        +    #        CMAKE_BINARY_DIR:       /tmp/deal.II/build
        +    #        CMAKE_CXX_COMPILER:     GNU 4.7.3 on platform Linux x86_64
        +    #                                /usr/bin/c++
        +    #
        +    #  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
        +    #      ( DEAL_II_WITH_64BIT_INDICES = OFF )
        +    #        DEAL_II_WITH_ARPACK set up with external dependencies
        +    #        DEAL_II_WITH_BOOST set up with external dependencies
        +    #        [...]
        +    #
        +    #  Component configuration:
        +    #        DEAL_II_COMPONENT_COMPAT_FILES
        +    #      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
        +    #        DEAL_II_COMPONENT_EXAMPLES
        +    #        DEAL_II_COMPONENT_MESH_CONVERTER
        +    #      ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
        +    #
        +    #  Detailed information (compiler flags, feature configuration) can be found in detailed.log
        +    #
        +    #  Run  $ make info  to print a help message with a list of top level targets
        +    #
        +    ###
        +      
        + This summary is also printed at the end of the configuration phase. + It tells you about build and install directory locations, feature + configuration (whether a feature is enabled with external/internal + dependencies, disabled or forced) and component configuration. + A more detailed version can be found in + CMAKE_BUILD_DIR/detailed.log that also includes detailed + information about feature configuration, e.g. +
        +
        +    #        DEAL_II_WITH_BOOST set up with external dependencies
        +    #            BOOST_VERSION = 1.52.0
        +    #            BOOST_DIR = 
        +    #            Boost_INCLUDE_DIRS = /usr/include
        +    #            Boost_LIBRARIES = /usr/lib64/libboost_serialization-mt.so;/usr/lib64/libboost_system-mt.so;
        +    # [...]
        +      
        + If this information is not sufficient, you might want to have a look + at the following files in CMAKE_BUILD_DIR +
          +
        • CMakeCache.txt: The file CMake stores its cached + variables in. Do not change directly. +
        • include/deal.II/base/config.h: The generated + config.h file +
        • lib/cmake/deal.II/deal.IIConfig.cmake: The project + configuration file for external projects. +
        +

        + + + + +

        Out-of-source versus in-source builds

        + +

        + A so called out-of-source build is a setup where the build directory + (the directory containing intermediate and generated files) is + different from the source directory (the directory containing the + source code). With CMake an out-of-source build is set up by invoking + cmake (or ccmake) from the designated build + directory, so for example (a build directory under the source + directory): +

        +
        +      $ mkdir build
        +      $ cd build
        +      $ cmake ..
        +      
        + The big advantage is that source files and intermediate files are + strictly separated (highly desired for version control) and that you + can have multiple build directories (with different configuration) at + the same time. +

        + +

        + Note: However, under rare occasions an in-source build might be + useful or needed , so it is supported +

        +
        +      $ cmake .
        +      
        + But we highly discourage it! +

        + + +

        CMake Generators

        + +

        + Cmake is a Makefile Generator. This allows to switch the + generator that is used to something different. If you for example want + to automatically generate an Eclipse project of deal.II, you can run +

        +
        +      $ cmake -G"Eclipse CDT4 - Unix Makefiles" [...]
        +      
        + and load up the build directory as a project directly into Eclipse. + Have a look at the Wiki for more information. +

        + +

        + An interesting alternative to (GNU) Make might also be Ninja. Configure via +

        +
        +      $ cmake -GNinja [...]
        +      
        + and run ninja instead of make. +

        + + + +

        Installation

        + +

        + It is not necessary to install the library in order to use deal.II. + Invoking the all or library target will + compile the library and set up all necessary configuration in the + build directory so that external projects can directly use it. + However, we strongly recommend to proceed in the way explained in the + README and install the + library to a designated install directory (different from source and + build directory). +

        + +

        + For installing the library it is necessary to set the CMake variable + CMAKE_INSTALL_PREFIX to the designated install + directory. You can do this by invoking cmake together + with -DCMAKE_INSTALL_PREFIX=<...> or by invoking + ccmake. +

        + +

        + Note: When you don't install deal.II to an install directory + and use it directly from a build directory, + both, the build and source directories have to be kept. +

        + +

        + Note: It is not necessary for the source, build and or install + directory to be different. All combinations are supported. +

        + + +

        Install a single component

        + +

        + If you want to only generate, compile and install a specific + component (most notably the documentation) you can use one of the + following top level targets: +

        +
        +    compat_files   - builds and installs the 'compat_files' component
        +    documentation  - builds and installs the 'documentation' component
        +    examples       - builds and installs the 'examples' component
        +    library        - builds and installs the 'library' component
        +    mesh_converter - builds and installs the 'mesh_converter' component
        +    parameter_gui  - builds and installs the 'parameter_gui' component
        +      
        + +

        Configuration options

        @@ -207,6 +445,7 @@

        +

        Feature configuration

        @@ -679,6 +918,11 @@ DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS to OFF. Beware of the fact that certain features may still pull in necessary compiler flags. + +
      7. + You can setup additional debug compiler flags to provide test + coverage information by setting + DEAL_II_SETUP_COVERAGE to ON.

      @@ -687,9 +931,9 @@

      Installation

      - the location, - where the deal.II library will be - installed to is set with the help of + the location, where the deal.II library will be + installed when invoking make install to is set with the + help of

       
           CMAKE_INSTALL_PREFIX
      @@ -697,7 +941,7 @@
       
             Please note that depending on whether
             DEAL_II_COMPONENT_COMPAT_FILES is set, there will be
      -      different directory structures:
      +      a different default directory structure: