]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Merge pull request #11402 from pratikvn/fix-ginkgo-cmake" 11410/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 22 Dec 2020 14:37:19 +0000 (14:37 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Tue, 22 Dec 2020 14:37:19 +0000 (14:37 +0000)
This reverts commit 927a89d58795378fa0060645f434e3627e8c8262, reversing
changes made to a47360cd42a75a208c1e753dda4ff5134804f225.

cmake/configure/configure_2_ginkgo.cmake
cmake/modules/FindGINKGO.cmake
tests/ginkgo/solver.cc
tests/ginkgo/solver.output

index c2a1950cbc84d139fab11887087a12ed91252fc3..32e912e8e740f125fd6990a97824e425470814ba 100644 (file)
 # Configuration for the Ginkgo library:
 #
 
+MACRO(FEATURE_GINKGO_ERROR_MESSAGE)
+  MESSAGE(FATAL_ERROR "\n"
+    "Could not find Ginkgo and supporting libraries!\n"
+    "Please ensure that the libraries are installed on your computer.\n"
+    "If the libraries are not at a default location, either provide some hints\n"
+    "for the autodetection:\n"
+    "    $ GINKGO_DIR=\"...\" cmake <...>\n"
+    "    $ cmake -DGINKGO_DIR=\"...\" <...>\n"
+    "or set the relevant variables by hand in ccmake.\n"
+    "Relevant hints for GINKGO are GINKGO_DIR.\n"
+    )
+ENDMACRO()
+
+MACRO(FEATURE_GINKGO_CONFIGURE_EXTERNAL)
+  SET(DEAL_II_GINKGO_BUILT_REFERENCE ${GINKGO_BUILT_REFERENCE})
+  SET(DEAL_II_GINKGO_BUILT_OPENMP ${GINKGO_BUILT_OMP})
+  SET(DEAL_II_GINKGO_BUILT_CUDA ${GINKGO_BUILT_CUDA})
+ENDMACRO()
+
 CONFIGURE_FEATURE(GINKGO)
index a81b5cfbd6d0260f233ee447353670665e7a7f5b..66fe7357ba6406e1f76a4a3aae8b1b7339e8a825 100644 (file)
 # This module exports
 #
 #   GINKGO_INCLUDE_DIRS
-#   GINKGO_INTERFACE_LINK_FLAGS
 #
 
 SET(GINKGO_DIR "" CACHE PATH "An optional hint to a GINKGO installation")
 SET_IF_EMPTY(GINKGO_DIR "$ENV{GINKGO_DIR}")
 
-find_package(Ginkgo
-  HINTS ${GINKGO_DIR} ${Ginkgo_DIR} $ENV{Ginkgo_DIR}
+DEAL_II_FIND_LIBRARY(GINKGO_LIBRARY
+  NAMES ginkgo
+  HINTS ${GINKGO_DIR}
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib
+    # This is a hint, isn't it?
+    build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libginkgo
+  )
+DEAL_II_FIND_LIBRARY(GINKGO_REFERENCE_LIBRARY
+  NAMES ginkgo_reference
+  HINTS ${GINKGO_DIR}
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib
+    # This is a hint, isn't it?
+    build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libginkgo_reference
+  )
+DEAL_II_FIND_LIBRARY(GINKGO_OMP_LIBRARY
+  NAMES ginkgo_omp
+  HINTS ${GINKGO_DIR}
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib
+    # This is a hint, isn't it?
+    build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libginkgo_omp
+  )
+DEAL_II_FIND_LIBRARY(GINKGO_CUDA_LIBRARY
+  NAMES ginkgo_cuda
+  HINTS ${GINKGO_DIR}
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib
+    # This is a hint, isn't it?
+    build/${CMAKE_CXX_PLATFORM_ID}-${CMAKE_SYSTEM_PROCESSOR}/libginkgo_cuda
+  )
+
+DEAL_II_FIND_PATH(GINKGO_INCLUDE_DIR ginkgo/ginkgo.hpp
+  HINTS ${GINKGO_DIR}
+  PATH_SUFFIXES include
   )
 
 DEAL_II_PACKAGE_HANDLE(GINKGO
   LIBRARIES
-    REQUIRED GINKGO_INTERFACE_LINK_FLAGS
-  INCLUDE_DIRS
-    REQUIRED GINKGO_INSTALL_INCLUDE_DIR
-  USER_INCLUDE_DIRS
-    REQUIRED GINKGO_INSTALL_INCLUDE_DIR
+    REQUIRED GINKGO_LIBRARY GINKGO_REFERENCE_LIBRARY GINKGO_OMP_LIBRARY GINKGO_CUDA_LIBRARY
+  INCLUDE_DIRS REQUIRED GINKGO_INCLUDE_DIR
+  USER_INCLUDE_DIRS REQUIRED GINKGO_INCLUDE_DIR
   CLEAR
-    GINKGO_INSTALL_INCLUDE_DIR GINKGO_INTERFACE_LINK_FLAGS
+    GINKGO_LIBRARY GINKGO_REFERENCE_LIBRARY GINKGO_OMP_LIBRARY GINKGO_CUDA_LIBRARY GINKGO_INCLUDE_DIR
   )
index b8f69375dc6a1a6c3726b061828b4cc84d7a061c..ff7af116a15fc8582785f083f3e78b289ce9f4fa 100644 (file)
@@ -101,8 +101,8 @@ main(int argc, char **argv)
     u = 0.;
     check_solver_within_range(gmres_solver.solve(A, u, f),
                               control.last_step(),
-                              20,
-                              49);
+                              23,
+                              29);
     u = 0.;
     check_solver_within_range(ir_solver_cg.solve(A, u, f),
                               control.last_step(),
index 631b3778ff583afe2833b5d9f0676a3a56c41b35..dda157582e34b43af14940c1a1edd163f8ca9b96 100644 (file)
@@ -4,6 +4,6 @@ DEAL::Solver stopped within 35 - 39 iterations
 DEAL::Solver stopped within 53 - 65 iterations
 DEAL::Solver stopped within 72 - 79 iterations
 DEAL::Solver stopped within 33 - 39 iterations
-DEAL::Solver stopped within 20 - 49 iterations
+DEAL::Solver stopped within 23 - 29 iterations
 DEAL::Solver stopped within 0 - 2 iterations
 DEAL::Solver stopped within 29 - 33 iterations

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.