diff options
author | Nichols A. Romero <naromero77@users.noreply.github.com> | 2019-02-17 07:17:58 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-02-17 08:17:58 -0500 |
commit | 05269ad3929ec61b13549184b6c0fb4c63d64157 (patch) | |
tree | a38f71a7b02f5e60b17520a762885e82cee62665 /var | |
parent | a93581e8de7c69c6c1ff860c427a851d2cf7ff7a (diff) | |
download | spack-05269ad3929ec61b13549184b6c0fb4c63d64157.tar.gz spack-05269ad3929ec61b13549184b6c0fb4c63d64157.tar.bz2 spack-05269ad3929ec61b13549184b6c0fb4c63d64157.tar.xz spack-05269ad3929ec61b13549184b6c0fb4c63d64157.zip |
Update CUDA support in QMCPACK (#10587)
* Support in QMCPACK for CUDA_ARCH flag.
* No need to have explicit CUDA variant anymore.
* Internal QMCPACK CMake assumes a minimum GPU architecture if none is provided.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/qmcpack/package.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index b03db97727..3a1210fd19 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -7,7 +7,7 @@ from spack import * import llnl.util.tty as tty -class Qmcpack(CMakePackage): +class Qmcpack(CMakePackage, CudaPackage): """QMCPACK, is a modern high-performance open-source Quantum Monte Carlo (QMC) simulation code.""" @@ -34,8 +34,6 @@ class Qmcpack(CMakePackage): variant('debug', default=False, description='Build debug version') variant('mpi', default=True, description='Build with MPI support') variant('phdf5', default=True, description='Build with parallel collective I/O') - variant('cuda', default=False, - description='Enable CUDA and GPU acceleration') variant('complex', default=False, description='Build the complex (general twist/k-point) version') variant('mixed', default=False, @@ -217,6 +215,11 @@ class Qmcpack(CMakePackage): if '+cuda' in spec: args.append('-DQMC_CUDA=1') + cuda_arch = spec.variants['cuda_arch'].value + if cuda_arch is not None: + args.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0])) + else: + args.append('-DCUDA_ARCH=sm_35') else: args.append('-DQMC_CUDA=0') |