diff options
author | Nichols A. Romero <naromero77@users.noreply.github.com> | 2018-12-30 11:29:28 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-12-30 11:29:28 -0600 |
commit | 54f76f7c512dab6e702c37b15469c6185c39cf18 (patch) | |
tree | d5f7439dffceceb17f45d2aa6f70c14d23be8d3b /var | |
parent | 70c5088a4c91f4313cd9390e54044502eaea5991 (diff) | |
download | spack-54f76f7c512dab6e702c37b15469c6185c39cf18.tar.gz spack-54f76f7c512dab6e702c37b15469c6185c39cf18.tar.bz2 spack-54f76f7c512dab6e702c37b15469c6185c39cf18.tar.xz spack-54f76f7c512dab6e702c37b15469c6185c39cf18.zip |
Over specifying Quantum Espresso compiler variables causes problems in some corner cases. (#10216)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/quantum-espresso/package.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 05ae5c4c38..5442ff0a43 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -109,12 +109,25 @@ class QuantumEspresso(Package): prefix_path = prefix.bin if '@:5.4.0' in spec else prefix options = ['-prefix={0}'.format(prefix_path)] + # QE autoconf compiler variables has some limitations: + # 1. There is no explicit MPICC variable so we must re-purpose + # CC for the case of MPI. + # 2. F90 variable is set to be consistent with MPIF90 wrapper + # 3. If an absolute path for F90 is set, the build system breaks. + # + # Thus, due to 2. and 3. the F90 variable is not explictly set + # because it would be mostly pointless and could lead to erroneous + # behaviour. if '+mpi' in spec: mpi = spec['mpi'] options.append('--enable-parallel=yes') options.append('MPIF90={0}'.format(mpi.mpifc)) + options.append('CC={0}'.format(mpi.mpicc)) else: options.append('--enable-parallel=no') + options.append('CC={0}'.format(env['SPACK_CC'])) + + options.append('F77={0}'.format(env['SPACK_F77'])) if '+openmp' in spec: options.append('--enable-openmp') @@ -178,12 +191,6 @@ class QuantumEspresso(Package): if '+hdf5' in spec: options.append('--with-hdf5={0}'.format(spec['hdf5'].prefix)) - options.extend([ - 'F77={0}'.format(env['SPACK_F77']), - 'F90={0}'.format(env['SPACK_FC']), - 'CC={0}'.format(env['SPACK_CC']) - ]) - configure(*options) # Apparently the build system of QE is so broken that: |