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')
|
description='Build the complex (general twist/k-point) version')
|
||||||
variant('mixed', default=False,
|
variant('mixed', default=False,
|
||||||
description='Build the mixed precision (mixture of single and '
|
description='Build the mixed precision (mixture of single and '
|
||||||
'double precision) version for gpu and cpu')
|
'double precision) version')
|
||||||
variant('soa', default=True,
|
variant('soa', default=True,
|
||||||
description='Build with Structure-of-Array instead of '
|
description='Build with Structure-of-Array instead of '
|
||||||
'Array-of-Structure code. Only for CPU code'
|
'Array-of-Structure code. Only for CPU code')
|
||||||
'and only in mixed precision')
|
|
||||||
variant('timers', default=False,
|
variant('timers', default=False,
|
||||||
description='Build with support for timers')
|
description='Build with support for timers')
|
||||||
variant('da', default=False,
|
variant('da', default=False,
|
||||||
@ -58,11 +57,19 @@ class Qmcpack(CMakePackage, CudaPackage):
|
|||||||
variant('qe', default=False,
|
variant('qe', default=False,
|
||||||
description='Install with patched Quantum Espresso 6.4.1')
|
description='Install with patched Quantum Espresso 6.4.1')
|
||||||
variant('afqmc', default=False,
|
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
|
# cuda variant implies mixed precision variant by default, but there is
|
||||||
# no way to express this in variant syntax, need something like
|
# no way to express this in variant syntax, need something like
|
||||||
# variant('+mixed', default=True, when='+cuda', description="...")
|
# 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
|
# high-level variant conflicts
|
||||||
conflicts(
|
conflicts(
|
||||||
@ -251,7 +258,12 @@ def cmake_args(self):
|
|||||||
# tested.
|
# tested.
|
||||||
|
|
||||||
if '+cuda' in spec:
|
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_list = spec.variants['cuda_arch'].value
|
||||||
cuda_arch = cuda_arch_list[0]
|
cuda_arch = cuda_arch_list[0]
|
||||||
if len(cuda_arch_list) > 1:
|
if len(cuda_arch_list) > 1:
|
||||||
|
Loading…
Reference in New Issue
Block a user