mirror of https://github.com/QMCPACK/qmcpack.git
Rename macro ENABLE_CUBLAS to ENABLE_CUDA.
This commit is contained in:
parent
bc34319f76
commit
13aaeb4715
|
@ -140,7 +140,7 @@ SET(QMC_OMP 1 CACHE BOOL "Enable/disable OpenMP")
|
|||
SET(QMC_COMPLEX 0 CACHE INTEGER "Build for complex binary")
|
||||
SET(PRINT_DEBUG 0 CACHE BOOL "Enable/disable debug printing")
|
||||
SET(QMC_CUDA 0 CACHE BOOL "Build with GPU support through CUDA")
|
||||
SET(ENABLE_CUBLAS 0 CACHE BOOL "Build with the second generation of GPU support through CUDA")
|
||||
SET(ENABLE_CUDA 0 CACHE BOOL "Build with the second generation of GPU support through CUDA")
|
||||
SET(ENABLE_SOA 0 CACHE BOOL "Enable/disable SoA optimization")
|
||||
|
||||
######################################################################
|
||||
|
@ -652,7 +652,7 @@ ELSE()
|
|||
ENDIF()
|
||||
|
||||
SET(HAVE_CUDA 0)
|
||||
IF(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
IF(QMC_CUDA OR ENABLE_CUDA)
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CUDA_PROPAGATE_HOST_FLAGS ON)
|
||||
ELSE(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
|
@ -683,9 +683,9 @@ IF(QMC_CUDA OR ENABLE_CUBLAS)
|
|||
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
|
||||
set(HAVE_CUDA 1)
|
||||
MESSAGE(" CUDA_NVCC_FLAGS=${CUDA_NVCC_FLAGS}")
|
||||
ELSE(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
ELSE(QMC_CUDA OR ENABLE_CUDA)
|
||||
MESSAGE(STATUS "Disabling CUDA")
|
||||
ENDIF(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
ENDIF(QMC_CUDA OR ENABLE_CUDA)
|
||||
|
||||
SET(USE_NVTX_API 0 CACHE BOOL "Enable/disable NVTX regions in CUDA code.")
|
||||
IF(USE_NVTX_API)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "QMCDrivers/QMCDriver.h"
|
||||
#include "Message/Communicate.h"
|
||||
#include "Message/OpenMP.h"
|
||||
#ifdef ENABLE_CUBLAS
|
||||
#ifdef ENABLE_CUDA
|
||||
#include <cuda_runtime_api.h>
|
||||
#endif
|
||||
#include <queue>
|
||||
|
@ -121,7 +121,7 @@ QMCMain::QMCMain(Communicate* c)
|
|||
app_summary() << std::endl;
|
||||
app_summary().flush();
|
||||
|
||||
#ifdef ENABLE_CUBLAS
|
||||
#ifdef ENABLE_CUDA
|
||||
// force the initialization of CUDA
|
||||
// This is only a temporal solution and more rigorous intialization of accelerators will replace the current hack
|
||||
cudaFree(0);
|
||||
|
|
|
@ -200,9 +200,9 @@ SET(FERMION_SRCS ${FERMION_SRCS}
|
|||
WaveFunctionFactory.cpp
|
||||
)
|
||||
|
||||
IF(ENABLE_CUBLAS)
|
||||
IF(ENABLE_CUDA)
|
||||
SET(FERMION_SRCS ${FERMION_SRCS} Fermion/delayed_update_helper.cu)
|
||||
ENDIF(ENABLE_CUBLAS)
|
||||
ENDIF(ENABLE_CUDA)
|
||||
|
||||
IF(NOT QMC_COMPLEX AND NOT ENABLE_SOA)
|
||||
SET(FERMION_SRCS ${FERMION_SRCS}
|
||||
|
@ -213,11 +213,11 @@ ENDIF(NOT QMC_COMPLEX AND NOT ENABLE_SOA)
|
|||
####################################
|
||||
# create libqmcwfs
|
||||
####################################
|
||||
IF(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
IF(QMC_CUDA OR ENABLE_CUDA)
|
||||
CUDA_ADD_LIBRARY(qmcwfs ${WFBASE_SRCS} ${JASTROW_SRCS} ${FERMION_SRCS})
|
||||
ELSE(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
ELSE(QMC_CUDA OR ENABLE_CUDA)
|
||||
ADD_LIBRARY(qmcwfs ${WFBASE_SRCS} ${JASTROW_SRCS} ${FERMION_SRCS})
|
||||
ENDIF(QMC_CUDA OR ENABLE_CUBLAS)
|
||||
ENDIF(QMC_CUDA OR ENABLE_CUDA)
|
||||
|
||||
IF(HAVE_CUDA)
|
||||
CUDA_ADD_CUBLAS_TO_TARGET(qmcwfs)
|
||||
|
|
|
@ -640,7 +640,7 @@ DiracDeterminant<DU_TYPE>::makeCopy(SPOSetPtr spo) const
|
|||
|
||||
typedef QMCTraits::ValueType ValueType;
|
||||
template class DiracDeterminant<DelayedUpdate<ValueType>>;
|
||||
#if defined(ENABLE_CUBLAS)
|
||||
#if defined(ENABLE_CUDA)
|
||||
template class DiracDeterminant<DelayedUpdateCUDA<ValueType>>;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "QMCWaveFunctions/Fermion/DiracDeterminantBase.h"
|
||||
#include "QMCWaveFunctions/Fermion/DiracMatrix.h"
|
||||
#include "QMCWaveFunctions/Fermion/DelayedUpdate.h"
|
||||
#if defined(ENABLE_CUBLAS)
|
||||
#if defined(ENABLE_CUDA)
|
||||
#include "QMCWaveFunctions/Fermion/DelayedUpdateCUDA.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ bool SlaterDetBuilder::putDeterminant(xmlNodePtr cur, int spin_group)
|
|||
|
||||
// whether to use an optimizable slater determinant
|
||||
std::string optimize("no");
|
||||
#if defined(ENABLE_CUBLAS)
|
||||
#if defined(ENABLE_CUDA)
|
||||
std::string useGPU("yes");
|
||||
#else
|
||||
std::string useGPU("no");
|
||||
|
@ -541,7 +541,7 @@ bool SlaterDetBuilder::putDeterminant(xmlNodePtr cur, int spin_group)
|
|||
#endif
|
||||
}
|
||||
#endif
|
||||
#if defined(ENABLE_CUBLAS)
|
||||
#if defined(ENABLE_CUDA)
|
||||
else if (useGPU == "yes")
|
||||
{
|
||||
app_log() << "Using DiracDeterminant with DelayedUpdateCUDA engine" << std::endl;
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace qmcplusplus
|
|||
{
|
||||
|
||||
typedef QMCTraits::ValueType ValueType;
|
||||
#ifdef ENABLE_CUBLAS
|
||||
#ifdef ENABLE_CUDA
|
||||
typedef DiracDeterminant<DelayedUpdateCUDA<ValueType>> DetType;
|
||||
#else
|
||||
typedef DiracDeterminant<DelayedUpdate<ValueType>> DetType;
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
#cmakedefine QMC_CUDA @QMC_CUDA@
|
||||
|
||||
/* Using CUDA for GPU execution, next generation */
|
||||
#cmakedefine ENABLE_CUBLAS @ENABLE_CUBLAS@
|
||||
#cmakedefine ENABLE_CUDA @ENABLE_CUDA@
|
||||
|
||||
/* Setting base precision for CUDA kernels */
|
||||
#cmakedefine CUDA_PRECISION @CUDA_PRECISION@
|
||||
|
|
Loading…
Reference in New Issue