# 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)
# 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}")
-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
+find_package(Ginkgo
+ HINTS ${GINKGO_DIR} ${Ginkgo_DIR} $ENV{Ginkgo_DIR}
)
DEAL_II_PACKAGE_HANDLE(GINKGO
LIBRARIES
- 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
+ REQUIRED GINKGO_INTERFACE_LINK_FLAGS
+ INCLUDE_DIRS
+ REQUIRED GINKGO_INSTALL_INCLUDE_DIR
+ USER_INCLUDE_DIRS
+ REQUIRED GINKGO_INSTALL_INCLUDE_DIR
CLEAR
- GINKGO_LIBRARY GINKGO_REFERENCE_LIBRARY GINKGO_OMP_LIBRARY GINKGO_CUDA_LIBRARY GINKGO_INCLUDE_DIR
+ GINKGO_INSTALL_INCLUDE_DIR GINKGO_INTERFACE_LINK_FLAGS
)
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 23 - 29 iterations
+DEAL::Solver stopped within 20 - 49 iterations
DEAL::Solver stopped within 0 - 2 iterations
DEAL::Solver stopped within 29 - 33 iterations