lammps package: added fftw_precision variant (#31459)
This commit is contained in:
parent
c8931e390a
commit
ff67e10f60
@ -144,6 +144,9 @@ def url_for_version(self, version):
|
|||||||
'64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)',
|
'64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)',
|
||||||
values=('smallbig', 'bigbig', 'smallsmall'), multi=False
|
values=('smallbig', 'bigbig', 'smallsmall'), multi=False
|
||||||
)
|
)
|
||||||
|
variant('fftw_precision', default='double', when='+kspace',
|
||||||
|
description='Select FFTW precision (used by Kspace)',
|
||||||
|
values=('single', 'double'), multi=False)
|
||||||
|
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
depends_on('mpi', when='+mpiio')
|
depends_on('mpi', when='+mpiio')
|
||||||
@ -567,20 +570,23 @@ def cmake_args(self):
|
|||||||
if '+kim' in spec:
|
if '+kim' in spec:
|
||||||
args.append('-DPKG_KIM=ON')
|
args.append('-DPKG_KIM=ON')
|
||||||
if '+kspace' in spec:
|
if '+kspace' in spec:
|
||||||
|
# If FFTW3 is selected, then CMake will try to detect, if threaded
|
||||||
|
# FFTW libraries are available and enable them by default.
|
||||||
if '^fftw' in spec:
|
if '^fftw' in spec:
|
||||||
args.append('-DFFT=FFTW3')
|
args.append('-DFFT=FFTW3')
|
||||||
if '^mkl' in spec:
|
if '^mkl' in spec:
|
||||||
args.append('-DFFT=MKL')
|
args.append('-DFFT=MKL')
|
||||||
if '^amdfftw' in spec:
|
if '^amdfftw' in spec:
|
||||||
# If FFTW3 is selected, then CMake will try to detect, if threaded
|
|
||||||
# FFTW libraries are available and enable them by default.
|
|
||||||
args.append(self.define('FFT', 'FFTW3'))
|
args.append(self.define('FFT', 'FFTW3'))
|
||||||
|
if '^cray-fftw' in spec:
|
||||||
|
args.append('-DFFT=FFTW3')
|
||||||
# Using the -DFFT_SINGLE setting trades off a little accuracy
|
# Using the -DFFT_SINGLE setting trades off a little accuracy
|
||||||
# for reduced memory use and parallel communication costs
|
# for reduced memory use and parallel communication costs
|
||||||
# for transposing 3d FFT data.
|
# for transposing 3d FFT data.
|
||||||
args.append(self.define('FFT_SINGLE', True))
|
if spec.satisfies('fftw_precision=single'):
|
||||||
if '^cray-fftw' in spec:
|
args.append('-DFFT_SINGLE=True')
|
||||||
args.append('-DFFT=FFTW3')
|
else:
|
||||||
|
args.append('-DFFT_SINGLE=False')
|
||||||
|
|
||||||
if '+kokkos' in spec:
|
if '+kokkos' in spec:
|
||||||
args.append('-DEXTERNAL_KOKKOS=ON')
|
args.append('-DEXTERNAL_KOKKOS=ON')
|
||||||
|
Loading…
Reference in New Issue
Block a user