Skip to content

Commit

Permalink
Cleanup remaining QMC_CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Mar 6, 2023
1 parent c2435c6 commit 629ba45
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 618 deletions.
4 changes: 0 additions & 4 deletions CMake/ctest_script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ if(DEFINED RMG_BIN)
set(CTEST_OPTIONS "${CTEST_OPTIONS};-DRMG_BIN='${RMG_BIN}'")
endif()

if(DEFINED QMC_CUDA)
set(CTEST_OPTIONS "${CTEST_OPTIONS};-DQMC_CUDA=${QMC_CUDA}")
endif()

if(DEFINED ENABLE_CUDA)
set(CTEST_OPTIONS "${CTEST_OPTIONS};-DENABLE_CUDA=${ENABLE_CUDA}")
endif()
Expand Down
4 changes: 2 additions & 2 deletions CMake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ function(
APPEND
PROPERTY LABELS "QMCPACK")

if(QMC_CUDA
OR ENABLE_CUDA
if(ENABLE_CUDA
OR ENABLE_ROCM
OR ENABLE_SYCL
OR ENABLE_OFFLOAD)
set_tests_properties(${TESTNAME} PROPERTIES RESOURCE_LOCK exclusively_owned_gpus)
endif()
Expand Down
4 changes: 2 additions & 2 deletions CMake/test_labels.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function(ADD_TEST_LABELS TEST_NAME TEST_LABELS)
set(TEST_LABELS_TEMP "")
set(TEST_LABELS_UNIQUE_NAME TEST_LABELS_${TEST_NAME}_${QMC_CUDA}_${QMC_COMPLEX}_${QMC_MIXED_PRECISION})
set(TEST_LABELS_UNIQUE_NAME TEST_LABELS_${TEST_NAME}_${QMC_COMPLEX}_${QMC_MIXED_PRECISION})
if(DEFINED ${TEST_LABELS_UNIQUE_NAME})
set(TEST_LABELS_TEMP ${${TEST_LABELS_UNIQUE_NAME}})
else()
set(SUCCESS FALSE)
execute_process(
COMMAND ${Python3_EXECUTABLE} ${qmcpack_SOURCE_DIR}/tests/scripts/test_labels.py ${TEST_NAME} ${QMC_CUDA}
COMMAND ${Python3_EXECUTABLE} ${qmcpack_SOURCE_DIR}/tests/scripts/test_labels.py ${TEST_NAME}
${QMC_COMPLEX} ${QMC_MIXED_PRECISION}
OUTPUT_VARIABLE TEST_LABELS_TEMP
RESULT_VARIABLE SUCCESS)
Expand Down
4 changes: 2 additions & 2 deletions CMake/unit_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function(ADD_UNIT_TEST TESTNAME PROCS THREADS TEST_BINARY)
set_tests_properties(${TESTNAME} PROPERTIES PROCESSORS ${TOT_PROCS} ENVIRONMENT OMP_NUM_THREADS=${THREADS}
PROCESSOR_AFFINITY TRUE)

if(QMC_CUDA
OR ENABLE_CUDA
if(ENABLE_CUDA
OR ENABLE_ROCM
OR ENABLE_SYCL
OR ENABLE_OFFLOAD)
set_tests_properties(${TESTNAME} PROPERTIES RESOURCE_LOCK exclusively_owned_gpus)
endif()
Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ include(CMakeDependentOption)
option(QMC_MPI "Enable/disable MPI" ON)
option(QMC_OMP "Enable/disable OpenMP" ON)
option(QMC_COMPLEX "Build for complex binary" OFF)
option(QMC_CUDA "Build with GPU support through CUDA" OFF)
option(
ENABLE_CUDA
"Build with the second generation of GPU support through CUDA (production quality for AFQMC, experimental for real space)"
OFF)
option(ENABLE_CUDA "Build with GPU support through CUDA" OFF)
option(QMC_CUDA2HIP "Map all CUDA kernels and library calls to HIP" OFF)
if(QMC_CUDA2HIP OR ENABLE_HIP)
set(ENABLE_ROCM ON) # option(ENABLE_ROCM) will be no-op
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,28 +153,26 @@ make -j 8
CMAKE_CXX_FLAGS_RELWITHDEBINFO
```

* Key QMC build options

```
QMC_CUDA Enable legacy CUDA code path for NVIDIA GPU acceleration (1:yes, 0:no)
QMC_COMPLEX Build the complex (general twist/k-point) version (1:yes, 0:no)
QMC_MIXED_PRECISION Build the mixed precision (mixing double/float) version
(1:yes (GPU default), 0:no (CPU default)).
The CPU support is experimental.
Use float and double for base and full precision.
The GPU support is quite mature.
Use always double for host side base and full precision
and use float and double for CUDA base and full precision.
ENABLE_CUDA ON/OFF(default). Enable CUDA code path for NVIDIA GPU acceleration.
Production quality for AFQMC. Pre-production quality for real-space.
Use CMAKE_CUDA_ARCHITECTURES, default 70, to set the actual GPU architecture.
ENABLE_OFFLOAD ON/OFF(default). Experimental feature. Enable OpenMP target offload for GPU acceleration.
ENABLE_TIMERS ON(default)/OFF. Enable fine-grained timers. Timers are on by default but at level coarse
to avoid potential slowdown in tiny systems.
For systems beyond tiny sizes (100+ electrons) there is no risk.
* Key QMCPACK build options

```
QMC_COMPLEX ON/OFF(default). Build the complex (general twist/k-point) version.
QMC_MIXED_PRECISION ON/OFF(default). Build the mixed precision (mixing double/float) version
Mixed precision calculations can be signifiantly faster but should be
carefully checked validated against full double precision runs,
particularly for large electron counts.
ENABLE_OFFLOAD ON/OFF(default). Enable OpenMP target offload for GPU acceleration.
ENABLE_CUDA ON/OFF(default). Enable CUDA code path for NVIDIA GPU acceleration.
Production quality for AFQMC and real-space performance portable implementation.
Use CMAKE_CUDA_ARCHITECTURES, default 70, to select the actual GPU architecture.
QMC_CUDA2HIP ON/OFF(default). Map all CUDA kernels and library calls to HIP and use ROCm libraries.
Set both ENABLE_CUDA and QMC_CUDA2HIP ON to target AMD GPUs.
Use CMAKE_HIP_ARCHITECTURES, default gfx906, to select the actual GPU architecture.
ENABLE_SYCL ON/OFF(default). Enable SYCL code path. Only support Intel GPUs and OneAPI compilers.
* Additional QMC options
```

* Additional QMCPACK options

```
QE_BIN Location of Quantum Espresso binaries including pw2qmcpack.x
Expand All @@ -187,6 +185,9 @@ make -j 8
saving default use of symbolic links for test files. Useful
if the build is on a separate filesystem from the source, as
required on some HPC systems.
ENABLE_TIMERS ON(default)/OFF. Enable fine-grained timers. Timers are on by default but at level coarse
to avoid potential slowdown in tiny systems.
For systems beyond tiny sizes (100+ electrons) there is no risk.
```

* libxml2 related
Expand Down
2 changes: 0 additions & 2 deletions config/build_olcf_andes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export LAPACK_LIBS="$BLAS_LIBS $OLCF_NETLIB_LAPACK_ROOT/lib64/liblapack.a"

declare -A builds=( ["cpu"]="-DBUILD_PPCONVERT=1" \
["complex_cpu"]="-DQMC_COMPLEX=1" \
# ["legacy_gpu"]="-DQMC_CUDA=1 " \
# ["complex_legacy_gpu"]="-DQMC_CUDA=1 -DQMC_COMPLEX=1 " \
)

mkdir bin_andes
Expand Down
41 changes: 0 additions & 41 deletions config/build_olcf_summit.sh

This file was deleted.

13 changes: 0 additions & 13 deletions config/load_olcf_summit_modules.sh

This file was deleted.

9 changes: 1 addition & 8 deletions docs/hamiltonianobservable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ Many pair potentials are supported. Though only the most commonly used pair pot
+------------------+---------+-----------------------------------------------+
| | mpc | Model periodic Coulomb interaction/correction |
+------------------+---------+-----------------------------------------------+
| | cpp | Core polarization potential |
+------------------+---------+-----------------------------------------------+
| | skpot | *Unknown* |
+------------------+---------+-----------------------------------------------+

Expand Down Expand Up @@ -148,16 +146,11 @@ Additional information:
of the classical/quantum ``particleset``.

- Only ``Coulomb, pseudo``, and ``mpc`` are described in detail in the
following subsections. The older or less-used types (``cpp, skpot``)
following subsections. The older or less-used types (``skpot``)
are not covered.

- Available only if ``QMC_CUDA`` is not defined: ``skpot``.

- Available only if ``OHMMS_DIM==3``: ``mpc, vhxc, pseudo``.

- Available only if ``OHMMS_DIM==3`` and ``QMC_CUDA`` is not defined:
``cpp``.

Coulomb potentials
~~~~~~~~~~~~~~~~~~

Expand Down
13 changes: 6 additions & 7 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,18 @@ the path to the source directory.

::

QMC_COMPLEX Build the complex (general twist/k-point) version (1:yes, 0:no)
QMC_MIXED_PRECISION Build the mixed precision (mixing double/float) version
(1:yes (QMC_CUDA=1 default), 0:no (QMC_CUDA=0 default)).
QMC_COMPLEX ON/OFF(default). Build the complex (general twist/k-point) version.
QMC_MIXED_PRECISION ON/OFF(default). Build the mixed precision (mixing double/float) version
Mixed precision calculations can be signifiantly faster but should be
carefully checked validated against full double precision runs,
particularly for large electron counts.
ENABLE_OFFLOAD ON/OFF(default). Enable OpenMP target offload for GPU acceleration.
QMC_CUDA Enable legacy CUDA code path for NVIDIA GPU acceleration (1:yes, 0:no)
ENABLE_CUDA ON/OFF(default). Enable CUDA code path for NVIDIA GPU acceleration.
Production quality for AFQMC and real-space performance portable implementation.
Use CMAKE_CUDA_ARCHITECTURES, default 70, to set the actual GPU architecture.
QMC_CUDA2HIP ON/OFF(default). To be set ON, it requires either QMC_CUDA or ENABLE_CUDA to be ON.
Compile CUDA source code as HIP and use ROCm libraries for AMD GPUs.
Use CMAKE_CUDA_ARCHITECTURES, default 70, to select the actual GPU architecture.
QMC_CUDA2HIP ON/OFF(default). Map all CUDA kernels and library calls to HIP and use ROCm libraries.
Set both ENABLE_CUDA and QMC_CUDA2HIP ON to target AMD GPUs.
Use CMAKE_HIP_ARCHITECTURES, default gfx906, to select the actual GPU architecture.
ENABLE_SYCL ON/OFF(default). Enable SYCL code path. Only support Intel GPUs and OneAPI compilers.

- General build options
Expand Down
2 changes: 1 addition & 1 deletion examples/molecules/H2O/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Test example

if(NOT QMC_CUDA AND NOT QMC_COMPLEX)
if(NOT QMC_COMPLEX)

list(APPEND H2O_SCALARS "totenergy" "-17.26138 .006") # total energy

Expand Down
2 changes: 1 addition & 1 deletion examples/molecules/He/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else()
set(MP_SUCCESS TRUE)
endif()

if(NOT QMC_CUDA AND NOT QMC_COMPLEX)
if(NOT QMC_COMPLEX)

list(APPEND HE_SIMPLE_VMC_SCALARS "totenergy" "-2.83 .006") # total energy

Expand Down
2 changes: 1 addition & 1 deletion src/qmcpack.settings
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_FCIQMC = @BUILD_FCIQMC@
ENABLE_OFFLOAD = @ENABLE_OFFLOAD@
ENABLE_CUDA = @ENABLE_CUDA@
QMC_CUDA2HIP = @QMC_CUDA2HIP@
ENABLE_CUDA = @ENABLE_SYCL@
ENABLE_SYCL = @ENABLE_SYCL@
ENABLE_PHDF5 = @ENABLE_PHDF5@
ENABLE_MASS = @ENABLE_MASS@
ENABLE_STACKTRACE = @ENABLE_STACKTRACE@
Expand Down
7 changes: 3 additions & 4 deletions tests/scripts/test_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,11 @@ def check_positive_label_sets(positive_label_sets):

# extract test name and build flags from args
try:
full_test,qmc_cuda,qmc_complex,qmc_mixed = sys.argv[1:]
qmc_cuda = qmc_cuda=='1'
full_test,qmc_complex,qmc_mixed = sys.argv[1:]
qmc_complex = qmc_complex=='1'
qmc_mixed = qmc_mixed=='1'
cpu = not qmc_cuda
gpu = qmc_cuda
cpu = True
gpu = False # was used for QMC_CUDA which has been removed from the codebase.
aos = False
soa = True
real = not qmc_complex
Expand Down
Loading

0 comments on commit 629ba45

Please sign in to comment.