From ce6d3571612964a09fafb6dfb1dc0d91191a16eb Mon Sep 17 00:00:00 2001 From: Sam Bateman Date: Sat, 5 Aug 2017 12:06:46 -0500 Subject: Correct boost +mpi for Cray compiler wrappers (#4909) --- var/spack/repos/builtin/packages/boost/package.py | 17 +++++++++++++++-- 1 file 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 += ' : MPICH_SKIP_MPICXX' + + f.write(mpi_line + ' ;\n') + if '+python' in spec: f.write(self.bjam_python_line(spec)) -- cgit v1.2.3-60-g2f50