]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce a configuration variable DEAL_II_WITH_CUDA_AWARE_MPI
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 18 Oct 2018 20:07:17 +0000 (22:07 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 4 Jan 2019 13:26:46 +0000 (14:26 +0100)
cmake/configure/configure_2_cuda_aware_mpi.cmake [new file with mode: 0644]
cmake/setup_cached_variables.cmake
include/deal.II/base/config.h.in

diff --git a/cmake/configure/configure_2_cuda_aware_mpi.cmake b/cmake/configure/configure_2_cuda_aware_mpi.cmake
new file mode 100644 (file)
index 0000000..6022ea6
--- /dev/null
@@ -0,0 +1,31 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2018 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.md at
+## the top level directory of deal.II.
+##
+## ---------------------------------------------------------------------
+
+FOREACH(_dependency MPI CUDA)
+  IF(NOT DEAL_II_WITH_${_dependency})
+    IF(DEAL_II_WITH_CUDA_AWARE_MPI)
+      MESSAGE(FATAL_ERROR "\n"
+        "DEAL_II_WITH_CUDA_AWARE_MPI has unmet configuration requirements: "
+        "DEAL_II_WITH_${_dependency} has to be set to \"ON\".\n\n"
+        )
+    ELSE()
+      MESSAGE(STATUS
+        "DEAL_II_WITH_CUDA_AWARE_MPI has unmet configuration requirements: "
+        "DEAL_II_WITH_${_dependency} has to be set to \"ON\"."
+        )
+      SET(DEAL_II_WITH_CUDA_AWARE_MPI OFF)
+    ENDIF()
+  ENDIF()
+ENDFOREACH()
index 1859c72a791b9a707e288a79acb9b319ed059e33..a769604252b95e51e93ccb09ac38ac21a75c5360 100644 (file)
@@ -365,6 +365,13 @@ UNSET(ENV{NVCCFLAGS})
 #                                                                      #
 ########################################################################
 
+ OPTION(DEAL_II_WITH_CUDA_AWARE_MPI
+   "If set to ON, then we assume that the MPI implementation used is CUDA-aware."
+   OFF
+   )
+ LIST(APPEND DEAL_II_FEATURES CUDA_AWARE_MPI)
+
+
 OPTION(DEAL_II_WITH_64BIT_INDICES
   "If set to ON, then use 64-bit data types to represent global degree of freedom indices. The default is to OFF. You only want to set this to ON if you will solve problems with more than 2^31 (approximately 2 billion) unknowns. If set to ON, you also need to ensure that both Trilinos and/or PETSc support 64-bit indices."
   OFF
index 325f61fedb04d4a16fcf728bb3b2f731d4b15216..7801a2397f442f89ad6879046c01ed80173c70ed 100644 (file)
@@ -40,6 +40,7 @@
 #cmakedefine DEAL_II_WITH_ASSIMP
 #cmakedefine DEAL_II_WITH_COMPLEX_VALUES
 #cmakedefine DEAL_II_WITH_CUDA
+#cmakedefine DEAL_II_WITH_CUDA_AWARE_MPI
 #cmakedefine DEAL_II_WITH_CXX14
 #cmakedefine DEAL_II_WITH_CXX17
 #cmakedefine DEAL_II_WITH_GSL

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.