From e59b506506ec44768fc5372b2cd063138f4ea4e0 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Wed, 18 Mar 2020 11:21:48 -0500 Subject: QMCPACK Update March 2020 (#15511) * Clean-up description of variants. * Support AFQMC with CUDA. --- .../repos/builtin/packages/qmcpack/package.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index 64a0e2c283..ba67282c0c 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -44,11 +44,10 @@ class Qmcpack(CMakePackage, CudaPackage): description='Build the complex (general twist/k-point) version') variant('mixed', default=False, description='Build the mixed precision (mixture of single and ' - 'double precision) version for gpu and cpu') + 'double precision) version') variant('soa', default=True, description='Build with Structure-of-Array instead of ' - 'Array-of-Structure code. Only for CPU code' - 'and only in mixed precision') + 'Array-of-Structure code. Only for CPU code') variant('timers', default=False, description='Build with support for timers') variant('da', default=False, @@ -58,11 +57,19 @@ class Qmcpack(CMakePackage, CudaPackage): variant('qe', default=False, description='Install with patched Quantum Espresso 6.4.1') variant('afqmc', default=False, - description='Install with AFQMC support') + description='Install with AFQMC support. NOTE that if used in ' + 'combination with CUDA, only AFQMC will have CUDA.') + # Notes about CUDA-centric peculiarities: + # # cuda variant implies mixed precision variant by default, but there is # no way to express this in variant syntax, need something like # variant('+mixed', default=True, when='+cuda', description="...") + # + # cuda+afqmc variant will not build the legacy CUDA code in real-space + # QMCPACK. This is due to a conflict in the build system. This is not + # worth fixing since the legacy CUDA code, will be superseded + # by the OpenMP 4.5 code. # high-level variant conflicts conflicts( @@ -251,7 +258,12 @@ class Qmcpack(CMakePackage, CudaPackage): # tested. if '+cuda' in spec: - args.append('-DQMC_CUDA=1') + # Cannot support both CUDA builds at the same time, see + # earlier notes in this package. + if '+afqmc' in spec: + args.append('-DENABLE_CUDA=1') + else: + args.append('-DQMC_CUDA=1') cuda_arch_list = spec.variants['cuda_arch'].value cuda_arch = cuda_arch_list[0] if len(cuda_arch_list) > 1: -- cgit v1.2.3-70-g09d2