sirius: add single precision switch (#24500)
This commit is contained in:
parent
d3a1da8496
commit
b1009b48b9
@ -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 @@ def cmake_args(self):
|
||||
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']
|
||||
|
Loading…
Reference in New Issue
Block a user