Commit 8ab8bf00 authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

fixing inconsistency with cuda architecture and cmake changes

parent 3fc18f78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ option(DCA_WITH_CUDA "Enable GPU support." ON)
option(DCA_WITH_GPU_AWARE_MPI "Enable GPU aware MPI." ON)

# Compile for Volta compute architecture.
set(CMAKE_CUDA_ARCHITECTURES 70 CACHE STRING "GPU Hardware Architecture.")
set(CUDA_ARCHITECTURES 70 CACHE STRING "GPU Hardware Architecture.")

# Summit's static CUDA runtime is bugged.
option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ set(DCA_CUDA_OPTIONS "")
if (DCA_HAVE_CUDA)
  if (CUDA_VERSION VERSION_GREATER "11.0.0")
    list(APPEND CMAKE_CUDA_FLAGS
      -arch=${CUDA_GPU_ARCH}
      -arch=${CUDA_ARCHITECTURES}
      -std=c++14
      -Xcompiler -Wall
      -Xcompiler -Wextra
@@ -45,7 +45,7 @@ if (DCA_HAVE_CUDA)
      -Xcompiler ${DCA_THREADING_FLAGS})
  else (CUDA_VERSION VERSION_GREATER "11.0.0")
    list(APPEND DCA_CUDA_OPTIONS
      -arch=${CUDA_GPU_ARCH}
      -arch=${CUDA_ARCHITECTURES}
      -std=c++11
      -Xcompiler -Wall
      -Xcompiler -Wextra
+3 −3
Original line number Diff line number Diff line
@@ -58,13 +58,13 @@ if (DCA_WITH_HIP)
  if (NOT DCA_HAVE_HIP)
    message(FATAL_ERROR "HIP and/or MAGMA not found but requested.")
  endif()
  dca_add_config_define(DCA_WITH_HIP)
  dca_add_config_define(DCA_WITH_GPU)
  dca_add_config_define(DCA_HAVE_HIP)
  dca_add_config_define(DCA_HAVE_GPU)
endif()

################################################################################
# Extra parameters common to all GPU setups.
if (DCA_WITH_GPU)
if (DCA_HAVE_GPU)
  if (NOT DCA_HAVE_MAGMA)
    message(FATAL_ERROR "At the moment the GPU code requires MAGMA.")
  endif()
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
# Checks for CUDA and MAGMA and accordingly sets DCA_HAVE_CUDA and DCA_HAVE_MAGMA.
# In addition, set DCA_GPU_LIBS.

#set(CUDA_ARCHITECTURES "sm_60" CACHE STRING "Name of the real architecture to build for.")
set(CUDA_ARCHITECTURES "sm_70" CACHE STRING "Name of the real architecture to build for.")
set(MAGMA_DIR "" CACHE PATH "Path to the MAGMA installation directory. Hint for CMake to find MAGMA.")

set(DCA_HAVE_CUDA FALSE CACHE INTERNAL "")
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ namespace config {
struct CMakeOptions {
  // CUDA
  static const std::string dca_with_cuda;
  static const std::string cuda_gpu_arch;
  static const std::string cuda_architectures;

  // Parallelization
  static const std::string dca_with_mpi;
Loading