QMCPACK Update March 2020 (#15511)
* Clean-up description of variants. * Support AFQMC with CUDA.
This commit is contained in:
parent
958f26073e
commit
e59b506506
@ -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,6 +258,11 @@ def cmake_args(self):
|
||||
# tested.
|
||||
|
||||
if '+cuda' in spec:
|
||||
# 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]
|
||||
|
Loading…
Reference in New Issue
Block a user