From bc7d7cd6dcde347e74ae260cf7bb0278c4b6cf6f Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 11 May 2021 11:13:02 -0400 Subject: [PATCH] Remove references to DEAL_II_WITH_THREADS. --- doc/doxygen/options.dox.in | 1 - doc/external-libs/cuda.html | 2 +- doc/readme.html | 2 +- doc/users/cmake_dealii.html | 10 +++------- doc/users/config.sample | 8 ++++---- include/deal.II/base/config.h.in | 7 ++++--- include/deal.II/base/thread_management.h | 20 ++++---------------- include/deal.II/lac/sparse_vanka.templates.h | 4 ---- 8 files changed, 17 insertions(+), 37 deletions(-) diff --git a/doc/doxygen/options.dox.in b/doc/doxygen/options.dox.in index 56a50b7c6a..02e614bdd8 100644 --- a/doc/doxygen/options.dox.in +++ b/doc/doxygen/options.dox.in @@ -229,7 +229,6 @@ PREDEFINED = DOXYGEN=1 \ DEAL_II_WITH_SYMENGINE=1 \ DEAL_II_SYMENGINE_WITH_LLVM=1 \ DEAL_II_WITH_TBB=1 \ - DEAL_II_WITH_THREADS=1 \ DEAL_II_WITH_TRILINOS=1 \ DEAL_II_TRILINOS_WITH_EPETRAEXT=1 \ DEAL_II_TRILINOS_WITH_MUELU=1 \ diff --git a/doc/external-libs/cuda.html b/doc/external-libs/cuda.html index bd9acea7c2..a2de7fd637 100644 --- a/doc/external-libs/cuda.html +++ b/doc/external-libs/cuda.html @@ -70,7 +70,7 @@ Using CUDA in combination with architecture-specific C++ compiler flags like -march=native is known to be fragile and there might be compatibility issues with other libraries, e.g. using CUDA 10.1 with - -DDEAL_II_WITH_THREADS=ON and + -DDEAL_II_WITH_TBB=ON and -DDEAL_II_CXX_FLAGS=-march=native results in compile time errors like:
diff --git a/doc/readme.html b/doc/readme.html
index 1bb38cc232..ab92e11d5b 100644
--- a/doc/readme.html
+++ b/doc/readme.html
@@ -327,7 +327,7 @@
         
  • Threading: By default, deal.II supports parallelism between multiple cores on the same machine using threads and a task-based model built on the - Threading Building Blocks. You can switch threading off by passing the -DDEAL_II_WITH_THREADS=OFF argument to cmake. + Threading Building Blocks. You can switch threading inside the library off by passing the -DDEAL_II_WITH_TBB=OFF argument to cmake.

  • diff --git a/doc/users/cmake_dealii.html b/doc/users/cmake_dealii.html index f4e3b095c0..880b379cab 100644 --- a/doc/users/cmake_dealii.html +++ b/doc/users/cmake_dealii.html @@ -473,19 +473,15 @@ DEAL_II_WITH_SCALAPACK DEAL_II_WITH_SLEPC DEAL_II_WITH_SUNDIALS DEAL_II_WITH_SYMENGINE -DEAL_II_WITH_THREADS +DEAL_II_WITH_TBB DEAL_II_WITH_TRILINOS DEAL_II_WITH_UMFPACK DEAL_II_WITH_ZLIB
    - They all have standard meaning with the exception of - two: + They all have standard meanings with the exception of one:

    diff --git a/doc/users/config.sample b/doc/users/config.sample index c7f66fb934..0662ff78c7 100644 --- a/doc/users/config.sample +++ b/doc/users/config.sample @@ -437,13 +437,13 @@ # -# Threading support: +# TBB support: # -# SET(DEAL_II_WITH_THREADS ON CACHE BOOL -# "Build deal.II with support for threads" +# SET(DEAL_II_WITH_TBB ON CACHE BOOL +# "Build deal.II with support for threads via TBB" # ) # -# SET(DEAL_II_FORCE_BUNDLED_THREADS TRUE CACHE BOOL +# SET(DEAL_II_FORCE_BUNDLED_TBB TRUE CACHE BOOL # "Always use the bundled tbb library instead of an external one." # ) # diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 4d7179fe66..3d4445f07d 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -66,11 +66,12 @@ #cmakedefine DEAL_II_WITH_ZLIB #ifdef DEAL_II_WITH_TBB -/* - * Backward compatibility setting: - * FIXME: Update once transition to taskflow is complete +/** + * For backwards compatibility, continue defining DEAL_II_WITH_THREADS when the + * library is configured with TBB. */ #define DEAL_II_WITH_THREADS + #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 #endif diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index f6a73197ae..0f7fcb1ca3 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1318,14 +1318,8 @@ namespace Threads * * @note Threads::new_task() is, in essence, equivalent to calling * `std::async(std::launch::async, ...)` in that it runs the given task - * in the background. (See https://en.cppreference.com/w/cpp/thread/async - * for more information.) The only difference is if you configured deal.II - * with `DEAL_II_WITH_THREADS=OFF`, then the operation described by the - * arguments of this function are executed immediately and the returned - * value is placed in the Task object returned here. This is useful for - * cases where one wants to run a program in a way where deal.II does not - * internally create parallel tasks, for example because one is already - * using one MPI process per core in a parallel computation. + * in the background. See https://en.cppreference.com/w/cpp/thread/async + * for more information. * * @ingroup threads */ @@ -1408,14 +1402,8 @@ namespace Threads * * @note Threads::new_task() is, in essence, equivalent to calling * `std::async(std::launch::async, ...)` in that it runs the given task - * in the background. (See https://en.cppreference.com/w/cpp/thread/async - * for more information.) The only difference is if you configured deal.II - * with `DEAL_II_WITH_THREADS=OFF`, then the operation described by the - * arguments of this function are executed immediately and the returned - * value is placed in the Task object returned here. This is useful for - * cases where one wants to run a program in a way where deal.II does not - * internally create parallel tasks, for example because one is already - * using one MPI process per core in a parallel computation. + * in the background. See https://en.cppreference.com/w/cpp/thread/async + * for more information. * * @ingroup CPP11 */ diff --git a/include/deal.II/lac/sparse_vanka.templates.h b/include/deal.II/lac/sparse_vanka.templates.h index 06c0f5d571..54b36f6126 100644 --- a/include/deal.II/lac/sparse_vanka.templates.h +++ b/include/deal.II/lac/sparse_vanka.templates.h @@ -106,9 +106,6 @@ SparseVanka::compute_inverses() Assert(matrix != nullptr, ExcNotInitialized()); Assert(selected != nullptr, ExcNotInitialized()); -#ifndef DEAL_II_WITH_THREADS - compute_inverses(0, matrix->m()); -#else const size_type n_inverses = std::count(selected->begin(), selected->end(), true); // somewhat arbitrarily set up an equal number of tasks as we have threads @@ -161,7 +158,6 @@ SparseVanka::compute_inverses() this->compute_inverses(blocking[i].first, blocking[i].second); }); tasks.join_all(); -#endif } -- 2.39.5