diff options
author | Sam Bateman <samuel.bateman@gmail.com> | 2017-08-05 12:06:46 -0500 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-08-05 12:06:46 -0500 |
commit | ce6d3571612964a09fafb6dfb1dc0d91191a16eb (patch) | |
tree | bf8bb9da62a71e3506eacad6e9e9a1659321feea | |
parent | 50bf261197e6280f8bf134a1320a4066feb34c86 (diff) | |
download | spack-ce6d3571612964a09fafb6dfb1dc0d91191a16eb.tar.gz spack-ce6d3571612964a09fafb6dfb1dc0d91191a16eb.tar.bz2 spack-ce6d3571612964a09fafb6dfb1dc0d91191a16eb.tar.xz spack-ce6d3571612964a09fafb6dfb1dc0d91191a16eb.zip |
Correct boost +mpi for Cray compiler wrappers (#4909)
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index cf63b229c0..77538cf000 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -207,8 +207,21 @@ class Boost(Package): spack_cxx)) if '+mpi' in spec: - f.write('using mpi : %s ;\n' % - join_path(spec['mpi'].prefix.bin, 'mpicxx')) + + # Use the correct mpi compiler. If the compiler options are + # empty or undefined, Boost will attempt to figure out the + # correct options by running "${mpicxx} -show" or something + # similar, but that doesn't work with the Cray compiler + # wrappers. Since Boost doesn't use the MPI C++ bindings, + # that can be used as a compiler option instead. + + mpi_line = 'using mpi : %s' % spec['mpi'].mpicxx + + if 'platform=cray' in spec: + mpi_line += ' : <define>MPICH_SKIP_MPICXX' + + f.write(mpi_line + ' ;\n') + if '+python' in spec: f.write(self.bjam_python_line(spec)) |