summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kozhevnikov <toxa81@gmail.com>2021-06-24 16:46:28 +0200
committerGitHub <noreply@github.com>2021-06-24 08:46:28 -0600
commitb1009b48b98219c89233aa46957d078666418324 (patch)
treee421438e2fbacff9c18b8b9203b634f46c4bad5d
parentd3a1da8496e3c7ec562a12f03f163c4b84bc85cb (diff)
downloadspack-b1009b48b98219c89233aa46957d078666418324.tar.gz
spack-b1009b48b98219c89233aa46957d078666418324.tar.bz2
spack-b1009b48b98219c89233aa46957d078666418324.tar.xz
spack-b1009b48b98219c89233aa46957d078666418324.zip
sirius: add single precision switch (#24500)
-rw-r--r--var/spack/repos/builtin/packages/sirius/package.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py
index bac1513f45..7d6e3f31ec 100644
--- a/var/spack/repos/builtin/packages/sirius/package.py
+++ b/var/spack/repos/builtin/packages/sirius/package.py
@@ -73,6 +73,7 @@ class Sirius(CMakePackage, CudaPackage):
values=('Debug', 'Release', 'RelWithDebInfo'))
variant('apps', default=True, description="Build applications")
variant('tests', default=False, description="Build tests")
+ variant('single_precision', default=False, description="Use single precision arithmetics")
depends_on('python', type=('build', 'run'))
depends_on('mpi')
@@ -97,6 +98,7 @@ class Sirius(CMakePackage, CudaPackage):
depends_on('spfft@0.9.6: +mpi', when='@6.4.0:')
depends_on('spfft@0.9.13:', when='@7.0.1:')
+ depends_on('spfft +single_precision', when='+single_precision ^spfft')
depends_on('spfft+cuda', when='+cuda ^spfft')
depends_on('spfft+rocm', when='+rocm ^spfft')
depends_on('spfft+openmp', when='+openmp ^spfft')
@@ -124,6 +126,7 @@ class Sirius(CMakePackage, CudaPackage):
conflicts('+shared', when='@6.3.0:6.4.999')
conflicts('+boost_filesystem', when='~apps')
conflicts('^libxc@5.0.0') # known to produce incorrect results
+ conflicts('+single_precision', when='@:7.2.4')
# Propagate openmp to blas
depends_on('openblas threads=openmp', when='+openmp ^openblas')
@@ -181,7 +184,8 @@ class Sirius(CMakePackage, CudaPackage):
self.define_from_variant('USE_ROCM', 'rocm'),
self.define_from_variant('BUILD_TESTING', 'tests'),
self.define_from_variant('BUILD_APPS', 'apps'),
- self.define_from_variant('BUILD_SHARED_LIBS', 'shared')
+ self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
+ self.define_from_variant('USE_FP32', 'single_precision')
]
lapack = spec['lapack']