diff --git a/packages/tpetra/CMakeCuda.txt b/packages/tpetra/CMakeCuda.txt index 2ad2d66c9602..b21409384878 100644 --- a/packages/tpetra/CMakeCuda.txt +++ b/packages/tpetra/CMakeCuda.txt @@ -25,7 +25,9 @@ ENDIF () # Checks that only matter if building with CUDA enabled. IF (Tpetra_ENABLE_CUDA) - message("CUDA_VERSION=${CUDA_VERSION}") + IF (DEFINED CUDA_VERSION) + message(STATUS "CUDA_VERSION=${CUDA_VERSION}") + ENDIF () IF (NOT DEFINED Kokkos_ENABLE_CUDA_LAMBDA OR NOT Kokkos_ENABLE_CUDA_LAMBDA) MESSAGE (FATAL_ERROR "If building with CUDA, Tpetra and downstream packages require that you set the CMake option Kokkos_ENABLE_CUDA_LAMBDA:BOOL=ON (this is the default behavior).") ENDIF () diff --git a/packages/tpetra/CMakeLists.txt b/packages/tpetra/CMakeLists.txt index a7a7cba11ab7..237b582059a0 100644 --- a/packages/tpetra/CMakeLists.txt +++ b/packages/tpetra/CMakeLists.txt @@ -368,7 +368,7 @@ ENDIF () # Tpetra_INST_SYCL # safe, but possibly less performant assumption that MPI is not CUDA # aware. -SET (Tpetra_ASSUME_GPU_AWARE_MPI_DEFAULT OFF) +SET (Tpetra_ASSUME_GPU_AWARE_MPI_DEFAULT ON) ASSERT_DEFINED (TPL_ENABLE_MPI) MESSAGE (STATUS "Determine whether Tpetra will assume that MPI is GPU aware:") @@ -511,7 +511,8 @@ ELSE () MESSAGE (STATUS " - While I found the \"ompi_info\" executable, it would not run. Thus, I will make the sane assumption that your MPI implementation is NOT GPU aware. You can change this at configure time with the option Tpetra_ASSUME_GPU_AWARE_MPI=ON, and override the configure-time setting at runtime with the environment variable TPETRA_ASSUME_GPU_AWARE_MPI=ON or OFF.") ENDIF () ELSE () - MESSAGE (STATUS " - Tpetra did not find the \"ompi_info\" executable. This may not be bad; for example, if your MPI implementation is not OpenMPI, then you won't have this executable. Tpetra will conservatively assume that your MPI implementation is NOT GPU aware. If you would like to change this, please set the CMake variable Tpetra_ASSUME_GPU_AWARE_MPI:BOOL=ON explicitly at configure time. You can also override this at runtime with the environment variable TPETRA_ASSUME_GPU_AWARE_MPI=ON or OFF.") + MESSAGE (STATUS " - Search for \"ompi_info\" failed, unable to automatically detect whether MPI is GPU-aware.") + MESSAGE (STATUS " - Whether MPI is GPU-aware may be specified at runtime with the environment variable TPETRA_ASSUME_GPU_AWARE_MPI=ON or OFF.") ENDIF () # Tpetra_FOUND_OMPI_INFO_EXECUTABLE ENDIF () # Whether we are cross compiling ENDIF () # Whether we have CUDA and MPI @@ -542,6 +543,7 @@ TRIBITS_ADD_OPTION_AND_DEFINE( ${Tpetra_ASSUME_CUDA_AWARE_MPI}) +MESSAGE(STATUS "Tpetra: defaulting to Tpetra_ASSUME_GPU_AWARE_MPI: ${Tpetra_ASSUME_GPU_AWARE_MPI}") # # Check that users did not attempt to enable both the OpenMP and @@ -587,6 +589,7 @@ MESSAGE(STATUS " - Cuda: ${HAVE_TPETRA_CUDA}") MESSAGE(STATUS " - HIP: ${HAVE_TPETRA_HIP}") MESSAGE(STATUS " - SYCL: ${HAVE_TPETRA_SYCL}") + # Fix Github Issue #190 by making sure that users enabled at least one # Node type. IF(NOT Tpetra_INST_SERIAL AND NOT Tpetra_INST_PTHREAD AND NOT Tpetra_INST_OPENMP AND NOT Tpetra_INST_CUDA AND NOT Tpetra_INST_HIP AND NOT Tpetra_INST_SYCL)