Unverified Commit 747ddf26 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

expose -DCUDA_PROXY define to CMake so that the GPU package can be used with...

expose -DCUDA_PROXY define to CMake so that the GPU package can be used with nvidia MPS proxy server
parent 088a6721
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1168,6 +1168,10 @@ if(PKG_GPU)
        message(FATAL_ERROR "Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.")
      endif()
      option(CUDPP_OPT "Enable CUDPP_OPT" ON)
      option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
      if(CUDA_MPS_SUPPORT)
        set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
      endif()

      set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")

@@ -1231,7 +1235,7 @@ if(PKG_GPU)
      add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
      target_link_libraries(gpu ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
      target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS})
      target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT)
      target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
      if(CUDPP_OPT)
        target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
        target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)