ShyLU/Tacho: Incorrectly gets disabled when all-caps version of RDC CMake option is used
Created by: theguruat12
@trilinos/framework @mhoemmen
When we use the all-caps KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE:BOOL=ON
instead of the CamelCase Kokkos_ENABLE_Cuda_Relocatable_Device_Code:BOOL=ON
, Tacho doesn't get disabled, and CMake stops with the error that @bartlettroscoe set up in #2580 (closed).
Possible Solution
Fix both shylu/shylu_node/tacho/CMakeLists.txt
and cmake/RepositoryDependenciesSetup.cmake
to use the following:
SET(SHYLUNODE_ENABLE_RDC OFF)
IF (DEFINED Kokkos_ENABLE_Cuda_Relocatable_Device_Code)
IF (DEFINED KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
IF ((Kokkos_ENABLE_Cuda_Relocatable_Device_Code AND (NOT KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)) OR ((NOT Kokkos_ENABLE_Cuda_Relocatable_Device_Code) AND KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE))
MESSAGE (FATAL_ERROR "You set two different capitalizations of the RDC flag with different values; this is a bad idea.")
ENDIF ()
ENDIF ()
ENDIF ()
IF (DEFINED Kokkos_ENABLE_Cuda_Relocatable_Device_Code AND Kokkos_ENABLE_Cuda_Relocatable_Device_Code)
SET(SHYLUNODE_ENABLE_RDC ON)
ENDIF()
IF (DEFINED KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE AND KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
SET(SHYLUNODE_ENABLE_RDC ON)
ENDIF()
IF (NOT SHYLUNODE_ENABLE_RDC)
MESSAGE(WARNING "ShyLu/Tacho requires CUDA relocatable device code to be enabled if CUDA is enabled. Set: KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON ")
ENDIF()
Related Issues
- Related to #2580 (closed)