summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qmcpack/package.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py
index 0ad9ac2418..64a0e2c283 100644
--- a/var/spack/repos/builtin/packages/qmcpack/package.py
+++ b/var/spack/repos/builtin/packages/qmcpack/package.py
@@ -57,6 +57,8 @@ class Qmcpack(CMakePackage, CudaPackage):
description='Install with Matplotlib (long installation time)')
variant('qe', default=False,
description='Install with patched Quantum Espresso 6.4.1')
+ variant('afqmc', default=False,
+ description='Install with AFQMC support')
# cuda variant implies mixed precision variant by default, but there is
# no way to express this in variant syntax, need something like
@@ -94,6 +96,12 @@ class Qmcpack(CMakePackage, CudaPackage):
conflicts('%pgi@:17', when='@3.6.0:', msg=compiler_warning)
conflicts('%llvm@:3.4', when='@3.6.0:', msg=compiler_warning)
+ conflicts('+afqmc', when='@:3.6.0', msg='AFQMC not recommended before v3.7')
+ conflicts('+afqmc', when='~mpi', msg='AFQMC requires building with +mpi')
+ conflicts('+afqmc', when='%gcc@:6.0', msg='AFQMC code requires gcc@6.1 or greater')
+ conflicts('+afqmc', when='%clang@:4.0', msg='AFQMC code requires clang 4.1 or greater')
+ conflicts('+afqmc', when='%intel@:18', msg='AFQMC code requires intel19 or greater')
+
# Prior to QMCPACK 3.5.0 Intel MKL was not properly detected with
# non-Intel compilers without a Spack-based hack. This hack
# had the potential for negative side effects and led to more
@@ -231,6 +239,11 @@ class Qmcpack(CMakePackage, CudaPackage):
else:
args.append('-DQMC_COMPLEX=0')
+ if '+afqmc' in spec:
+ args.append('-DBUILD_AFQMC=1')
+ else:
+ args.append('-DBUILD_AFQMC=0')
+
# When '-DQMC_CUDA=1', CMake automatically sets:
# '-DQMC_MIXED_PRECISION=1'
#