2
2
# Project settings
3
3
#------------------------------------------------------------------------------#
4
4
5
- cmake_minimum_required (VERSION 3.9 )
5
+ cmake_minimum_required (VERSION 3.12 )
6
6
include (CheckLanguage )
7
7
8
8
project (VertexCFD LANGUAGES CXX )
9
- check_language (CUDA )
10
- if (CMAKE_CUDA_COMPILER )
11
- enable_language (CUDA )
12
- endif ()
13
9
set (PROJECT_VERSION "0.0-dev" )
14
10
15
11
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS )
@@ -26,6 +22,12 @@ include(GNUInstallDirs)
26
22
27
23
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake )
28
24
25
+ # Set the exodiff path relative to Trilinos installation path
26
+ set (EXODIFF_PATH ${Trilinos_ROOT} /bin/exodiff )
27
+
28
+ # Set the Trilinos lib path relative to Trilinos installation path
29
+ set (TRILINOS_LIB ${Trilinos_ROOT} /lib64 )
30
+
29
31
option (NO_PARMETIS_SUPPORT "No parmetis support" ON )
30
32
add_compile_definitions (NO_PARMETIS_SUPPORT )
31
33
@@ -46,31 +48,19 @@ find_package(YAPF)
46
48
find_package (MPI REQUIRED )
47
49
48
50
find_package (Trilinos REQUIRED )
49
- if (Trilinos_VERSION VERSION_LESS 13 OR Trilinos_VERSION VERSION_GREATER_EQUAL 17 )
50
- message (FATAL_ERROR "Incompatible Trilinos version ${Trilinos_VERSION} . Only Trilinos versions 13 and 14 are supported." )
51
+ if (Trilinos_VERSION VERSION_LESS 16 OR Trilinos_VERSION VERSION_GREATER_EQUAL 17 )
52
+ message (FATAL_ERROR "Incompatible Trilinos version ${Trilinos_VERSION} . Only Trilinos version 16 and above are supported." )
51
53
endif ()
52
54
53
- if (VertexCFD_ENABLE_HYPRE )
54
- find_package (HYPRE REQUIRED )
55
- if (HYPRE_FOUND )
56
- message ( STATUS "Found HYPRE: ${HYPRE_DIR} " )
57
- endif ()
58
- find_package (HYPREDRV REQUIRED )
59
- if (HYPREDRV_FOUND )
60
- message ( STATUS "Found HYPREDrive: ${HYPREDRV_DIR} " )
61
- endif ()
62
- add_compile_definitions (VERTEXCFD_HAVE_HYPRE )
55
+ # FIXME Tacho requires rocblas, rocsparse, and rocsolver with HIP but doesn't
56
+ # enforce this dependency explicitly through version 16.0.0
57
+ if (Kokkos_ENABLE_HIP AND NOT (ShyLU_NodeTacho_ENABLE_ROCSOLVER AND ShyLU_NodeTacho_ENABLE_ROCSPARSE AND ShyLU_NodeTacho_ENABLE_ROCBLAS ))
58
+ message (FATAL_ERROR "ShyLU_NodeTacho wasn't configured with the ROC* TPLs enabled!" )
63
59
endif ()
64
60
65
61
if (VertexCFD_ENABLE_HYPRE )
66
62
find_package (HYPRE REQUIRED )
67
- if (HYPRE_FOUND )
68
- message ( STATUS "Found HYPRE: ${HYPRE_DIR} " )
69
- endif ()
70
63
find_package (HYPREDRV REQUIRED )
71
- if (HYPREDRV_FOUND )
72
- message ( STATUS "Found HYPREDrive: ${HYPREDRV_DIR} " )
73
- endif ()
74
64
add_compile_definitions (VERTEXCFD_HAVE_HYPRE )
75
65
endif ()
76
66
@@ -92,6 +82,8 @@ endif()
92
82
# therefore is not accessible here which would have been perferable.
93
83
if (Kokkos_ENABLE_CUDA )
94
84
set (VERTEXCFD_KOKKOS_DEVICE_TYPE "CUDA" )
85
+ elseif (Kokkos_ENABLE_HIP )
86
+ set (VERTEXCFD_KOKKOS_DEVICE_TYPE "HIP" )
95
87
elseif (Kokkos_ENABLE_OPENMP )
96
88
set (VERTEXCFD_KOKKOS_DEVICE_TYPE "OPENMP" )
97
89
elseif (Kokkos_ENABLE_SERIAL )
@@ -111,10 +103,6 @@ endif()
111
103
# output Phalanx/Panzer device type
112
104
message ( STATUS "Phalanx/Panzer Kokkos device type: ${VERTEXCFD_KOKKOS_DEVICE_TYPE} " )
113
105
114
- if (CMAKE_CUDA_COMPILER )
115
- find_package (CUDAToolkit )
116
- endif ()
117
-
118
106
#------------------------------------------------------------------------------#
119
107
# Tests and Documentation
120
108
#------------------------------------------------------------------------------#
@@ -179,6 +167,15 @@ add_subdirectory(examples)
179
167
180
168
file (COPY regression_test DESTINATION . )
181
169
170
+ # Delete the unwanted file from the destination
171
+ file (REMOVE ${CMAKE_CURRENT_BINARY_DIR} /regression_test/vertexcfd_test.py.in )
172
+ file (REMOVE ${CMAKE_CURRENT_BINARY_DIR} /regression_test/rename_variables_exodus.py.in )
173
+
174
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /regression_test/vertexcfd_test.py.in
175
+ ${CMAKE_CURRENT_BINARY_DIR} /regression_test/vertexcfd_test.py )
176
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /regression_test/rename_variables_exodus.py.in
177
+ ${CMAKE_CURRENT_BINARY_DIR} /regression_test/rename_variables_exodus.py )
178
+
182
179
##---------------------------------------------------------------------------##
183
180
## Package Configuration
184
181
##---------------------------------------------------------------------------##
0 commit comments