diff --git a/boost.changes b/boost.changes index 4311c38..fdf603e 100644 --- a/boost.changes +++ b/boost.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 9 08:13:38 UTC 2017 - nmoreychaisemartin@suse.com + +- Setup MPI environment prior to building boost. +- Switch to OpenMPI2 as OpenMPI1 is becoming deprecated. + ------------------------------------------------------------------- Wed Sep 20 11:54:35 UTC 2017 - adam.majer@suse.de diff --git a/boost.spec b/boost.spec index 399fe3e..0cd4ce9 100644 --- a/boost.spec +++ b/boost.spec @@ -27,6 +27,18 @@ %define my_docdir %{_docdir}/boost-%{version} # Build with OpenMPI +%if 0%{?suse_version} >= 1330 + # OpenMPI >= 2 is not available on ppc64be + %ifarch ppc64 + %define mpi_implem openmpi + %else + %define mpi_implem openmpi2 + %endif +%else + # Keep OpenMPI1 for older releases where OpenMPI2 is not available + %define mpi_implem openmpi +%endif + %ifarch ia64 hppa %bcond_with build_mpi %else @@ -131,7 +143,7 @@ BuildRequires: python3-numpy-devel BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with build_mpi} -BuildRequires: openmpi-devel +BuildRequires: %{mpi_implem}-devel %endif %if %{with build_docs} BuildRequires: docbook @@ -558,9 +570,9 @@ Requires: libboost_python-py2_7-%{lib_appendix}-devel %if %{with python3} Requires: libboost_python-py3-%{lib_appendix}-devel %endif +Requires: %{mpi_implem}-devel Requires: libboost_mpi%{lib_appendix} = %{version} Requires: libboost_serialization%{lib_appendix}-devel -Requires: openmpi-devel Provides: libboost_mpi-devel = %{version} Conflicts: otherproviders(libboost_mpi-devel) Conflicts: boost-devel < 1.63 @@ -1113,8 +1125,7 @@ EOF %if %{with build_mpi} # Set PATH, MANPATH and LD_LIBRARY_PATH for mpi -#. %{_localstatedir}/mpi-selector/data/$(rpm --qf "%{NAME}-%{VERSION}" -q openmpi).sh -# fixme: use mpi-selector ???? +. %{_libdir}/mpi/gcc/%{mpi_implem}/bin/mpivars.sh %endif # Need specific Boost Jam config files. @@ -1241,6 +1252,11 @@ cd doc # Read shared build instructions . ./.build +%if %{with build_mpi} +# Set PATH, MANPATH and LD_LIBRARY_PATH for mpi +. %{_libdir}/mpi/gcc/%{mpi_implem}/bin/mpivars.sh +%endif + %if %{with python3} ./b2 -d+2 -q --user-config=./user-config-py3.jam \ --build-type=minimal --build-dir=./python3-build \