diff options
author | Ye Luo <yeluo@anl.gov> | 2021-12-01 20:39:06 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 18:39:06 -0800 |
commit | 1cdb764422dd71e5c432a9ceb6d14f081bc69a08 (patch) | |
tree | eb9929e5c4132d8ed047ae66bbffe0eceaf8547d | |
parent | d0beab80128fe53bf6c486b029c40e4935570c89 (diff) | |
download | spack-1cdb764422dd71e5c432a9ceb6d14f081bc69a08.tar.gz spack-1cdb764422dd71e5c432a9ceb6d14f081bc69a08.tar.bz2 spack-1cdb764422dd71e5c432a9ceb6d14f081bc69a08.tar.xz spack-1cdb764422dd71e5c432a9ceb6d14f081bc69a08.zip |
QMCPACK: fix use of MPI wrappers (#27744)
-rw-r--r-- | var/spack/repos/builtin/packages/qmcpack/package.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index a48a186f83..4445c43f95 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -216,6 +216,13 @@ class Qmcpack(CMakePackage, CudaPackage): return targets + # QMCPACK prefers taking MPI compiler wrappers as CMake compilers. + def setup_build_environment(self, env): + spec = self.spec + if '+mpi' in spec: + env.set('CC', spec['mpi'].mpicc) + env.set('CXX', spec['mpi'].mpicxx) + def cmake_args(self): spec = self.spec args = [] @@ -353,20 +360,11 @@ class Qmcpack(CMakePackage, CudaPackage): return args - # QMCPACK needs custom install method for a couple of reasons: - # Firstly, wee follow the recommendation on the Spack website - # for defining the compilers variables to be the MPI compiler wrappers. - # https://spack.readthedocs.io/en/latest/packaging_guide.html#compiler-wrappers - # + # QMCPACK needs custom install method for the following reason: # Note that 3.6.0 release and later has a functioning 'make install', # but still does not install nexus, manual, etc. So, there is no compelling # reason to use QMCPACK's built-in version at this time. def install(self, spec, prefix): - if '+mpi' in spec: - env['CC'] = spec['mpi'].mpicc - env['CXX'] = spec['mpi'].mpicxx - env['F77'] = spec['mpi'].mpif77 - env['FC'] = spec['mpi'].mpifc # create top-level directory mkdirp(prefix) |