From d0a79fd80d5e875a405cd9e5801c87df182056a7 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Fri, 16 Apr 2021 17:10:11 -0500 Subject: QE April 2021 (#23049) --- .../builtin/packages/quantum-espresso/package.py | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 929ccbbea9..8206228fb9 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -193,8 +193,8 @@ class QuantumEspresso(Package): # NOTE: *SOME* third-party patches will require deactivation of # upstream patches using `~patch` variant - # QMCPACK converter patches for QE 6.4.1, 6.4, and 6.3 - conflicts('@:6.2,6.5:', when='+qmcpack', + # QMCPACK converter patches for QE 6.7, 6.4.1, 6.4, and 6.3 + conflicts('@:6.2,6.5:6.6', when='+qmcpack', msg='QMCPACK converter NOT available for this version of QE') # Internal compiler error gcc8 and a64fx, I check only 6.5 and 6.6 @@ -204,6 +204,11 @@ class QuantumEspresso(Package): conflicts('@6.5:', when='+environ', msg='6.4.x is the latest QE series supported by Environ') + # 6.7 + patch_url = 'https://raw.githubusercontent.com/QMCPACK/qmcpack/develop/external_codes/quantum_espresso/add_pw2qmcpack_to_qe-6.7.0.diff' + patch_checksum = '72564c168231dd4a1279a74e76919af701d47cee9a851db6e205753004fe9bb5' + patch(patch_url, sha256=patch_checksum, when='@6.7+qmcpack') + # 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' @@ -279,10 +284,6 @@ class QuantumEspresso(Package): # extlibs_makefile updated to work with fujitsu compilers patch('fj-fox.patch', when='+patch %fj') - # Spurious problems running in parallel the Makefile - # generated by the configure - parallel = False - def install(self, spec, prefix): prefix_path = prefix.bin if '@:5.4.0' in spec else prefix @@ -376,8 +377,11 @@ class QuantumEspresso(Package): # BLAS_LIBS being set # However, MKL is correctly picked up by qe-6.5 for BLAS and FFT if # MKLROOT is set (which SPACK does automatically for ^mkl) - if not ('quantum-espresso@6.5' in spec and '^mkl' in spec): + if spec.satisfies('@:6.4'): # set even if MKL is selected options.append('BLAS_LIBS={0}'.format(lapack_blas.ld_flags)) + else: # behavior changed at 6.5 and later + if not spec.satisfies('^mkl'): + options.append('BLAS_LIBS={0}'.format(lapack_blas.ld_flags)) if '+scalapack' in spec: if '^mkl' in spec: @@ -451,10 +455,16 @@ class QuantumEspresso(Package): zlib_libs, format(spec['zlib'].libs.ld_flags), make_inc ) + # QE 6.6 and later has parallel builds fixed + if spec.satisfies('@:6.5'): + parallel_build_on = False + else: + parallel_build_on = True + if '+epw' in spec: - make('all', 'epw') + make('all', 'epw', parallel=parallel_build_on) else: - make('all') + make('all', parallel=parallel_build_on) if '+environ' in spec: addsonpatch = Executable('./install/addsonpatch.sh') @@ -467,7 +477,7 @@ class QuantumEspresso(Package): makedeps() - make('pw') + make('pw', parallel=parallel_build_on) if 'platform=darwin' in spec: mkdirp(prefix.bin) -- cgit v1.2.3-60-g2f50