QMCPACK: fix use of MPI wrappers (#27744)
This commit is contained in:
parent
d0beab8012
commit
1cdb764422
@ -216,6 +216,13 @@ def build_targets(self):
|
|||||||
|
|
||||||
return targets
|
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):
|
def cmake_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
args = []
|
args = []
|
||||||
@ -353,20 +360,11 @@ def cmake_args(self):
|
|||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
# QMCPACK needs custom install method for a couple of reasons:
|
# QMCPACK needs custom install method for the following reason:
|
||||||
# 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
|
|
||||||
#
|
|
||||||
# Note that 3.6.0 release and later has a functioning 'make install',
|
# 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
|
# but still does not install nexus, manual, etc. So, there is no compelling
|
||||||
# reason to use QMCPACK's built-in version at this time.
|
# reason to use QMCPACK's built-in version at this time.
|
||||||
def install(self, spec, prefix):
|
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
|
# create top-level directory
|
||||||
mkdirp(prefix)
|
mkdirp(prefix)
|
||||||
|
Loading…
Reference in New Issue
Block a user