diff options
author | Martin Hilgeman <martin.hilgeman@dell.com> | 2021-04-30 08:17:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 08:17:01 +0200 |
commit | bb038c3b6c4448a151e47551155cec8010d0c03c (patch) | |
tree | 309a921614a91865ac9fe0471aa4e418491e925e | |
parent | b2d92bbb9f019b8b3437a8532c0cb7b9a2ae2ffe (diff) | |
download | spack-bb038c3b6c4448a151e47551155cec8010d0c03c.tar.gz spack-bb038c3b6c4448a151e47551155cec8010d0c03c.tar.bz2 spack-bb038c3b6c4448a151e47551155cec8010d0c03c.tar.xz spack-bb038c3b6c4448a151e47551155cec8010d0c03c.zip |
quantum espresso: fix OpenMP support (#23220)
-rw-r--r-- | var/spack/repos/builtin/packages/quantum-espresso/package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 8206228fb9..5d87ef6645 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -209,6 +209,13 @@ class QuantumEspresso(Package): patch_checksum = '72564c168231dd4a1279a74e76919af701d47cee9a851db6e205753004fe9bb5' patch(patch_url, sha256=patch_checksum, when='@6.7+qmcpack') + # Need OpenMP threaded FFTW and BLAS libraries when configured + # with OpenMP support + conflicts('^fftw~openmp', when='+openmp') + conflicts('^amdfftw~openmp', when='+openmp') + conflicts('^openblas threads=none', when='+openmp') + conflicts('^openblas threads=pthreads', when='+openmp') + # 6.4.1 patch_url = 'https://raw.githubusercontent.com/QMCPACK/qmcpack/develop/external_codes/quantum_espresso/add_pw2qmcpack_to_qe-6.4.1.diff' patch_checksum = '57cb1b06ee2653a87c3acc0dd4f09032fcf6ce6b8cbb9677ae9ceeb6a78f85e2' @@ -347,7 +354,10 @@ class QuantumEspresso(Package): if '^fftw@3:' in spec: fftw_prefix = spec['fftw'].prefix options.append('FFTW_INCLUDE={0}'.format(fftw_prefix.include)) - fftw_ld_flags = spec['fftw'].libs.ld_flags + if '+openmp' in spec: + fftw_ld_flags = spec['fftw:openmp'].libs.ld_flags + else: + fftw_ld_flags = spec['fftw'].libs.ld_flags options.append('FFT_LIBS={0}'.format(fftw_ld_flags)) if '^amdfftw' in spec: |