From 30150eaf4953db449269f9b3ea61a5b1f5d32ed3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sat, 1 Jul 2017 12:08:54 +0100 Subject: [PATCH] Rebase to 1.64.0 --- boost-1.63.0-dual-python-build-v2.patch | 42 --------- boost-1.64.0-dual-python-build.patch | 25 +++++ boost-1.64.0-mpi-get_data.patch | 119 ++++++++++++++++++++++++ boost-1.64.0-mpi-make_array.patch | 21 +++++ boost.spec | 16 +++- 5 files changed, 178 insertions(+), 45 deletions(-) create mode 100644 boost-1.64.0-dual-python-build.patch create mode 100644 boost-1.64.0-mpi-get_data.patch create mode 100644 boost-1.64.0-mpi-make_array.patch diff --git a/boost-1.63.0-dual-python-build-v2.patch b/boost-1.63.0-dual-python-build-v2.patch index dfb6ee1..2baf69c 100644 --- a/boost-1.63.0-dual-python-build-v2.patch +++ b/boost-1.63.0-dual-python-build-v2.patch @@ -85,45 +85,3 @@ } } else if ! ( --without-mpi in [ modules.peek : ARGV ] ) ---- boost_1_63_0/libs/python/build/Jamfile 2017-05-19 02:33:53.600132400 -0500 -+++ boost_1_63_0/libs/python/build/Jamfile 2017-05-19 01:50:43.746550000 -0500 -@@ -140,7 +140,7 @@ rule lib_boost_numpy ( is-py3 ? ) - [ cond [ python.numpy ] : /python//python_for_extensions ] - [ unless [ python.numpy ] : no ] - $(numpy-include) -- boost_python -+ [ cond $(is-py3) : boost_python3 : boost_python ] - on:BOOST_DEBUG_PYTHON - [ cond $(is-py3) : $(py3-version) ] - -@@ -154,22 +154,25 @@ rule lib_boost_numpy ( is-py3 ? ) - ; - } - --libraries = boost_python ; -+libraries2 = boost_python ; - libraries3 = boost_python3 ; - if [ python.numpy ] - { -- libraries += boost_numpy ; -+ libraries2 += boost_numpy ; - libraries3 += boost_numpy3 ; - } - --lib_boost_python ; --lib_boost_numpy ; -- - if $(py3-version) - { - lib_boost_python yes ; - lib_boost_numpy yes ; - libraries += $(libraries3) ; - } -+else -+{ -+ lib_boost_python ; -+ lib_boost_numpy ; -+ libraries += $(libraries2) ; -+} - - boost-install $(libraries) ; diff --git a/boost-1.64.0-dual-python-build.patch b/boost-1.64.0-dual-python-build.patch new file mode 100644 index 0000000..2934475 --- /dev/null +++ b/boost-1.64.0-dual-python-build.patch @@ -0,0 +1,25 @@ +--- boost_1_64_0/tools/build/src/tools/python.jam ++++ boost_1_64_0/tools/build/src/tools/python.jam +@@ -939,14 +939,14 @@ + # for a particular target OS as the default. This makes it so that we can + # select a python interpreter with only knowledge of the target OS. And hence + # can configure different Pythons based on the target OS only. +- local toolset-requirements = [ toolset.requirements ] ; +- local toolset-target-os-requirements +- = [ property.evaluate-conditionals-in-context +- [ $(toolset-requirements).raw ] : $(target-os) ] ; +- if ! in $(toolset-target-os-requirements:G) +- { +- toolset.add-requirements $(target-os):$(version:E=default) ; +- } ++ #local toolset-requirements = [ toolset.requirements ] ; ++ #local toolset-target-os-requirements ++ # = [ property.evaluate-conditionals-in-context ++ # [ $(toolset-requirements).raw ] : $(target-os) ] ; ++ #if ! in $(toolset-target-os-requirements:G) ++ #{ ++ # toolset.add-requirements $(target-os):$(version:E=default) ; ++ #} + + # Register the right suffix for extensions. + register-extension-suffix $(extension-suffix) : $(target-requirements) ; diff --git a/boost-1.64.0-mpi-get_data.patch b/boost-1.64.0-mpi-get_data.patch new file mode 100644 index 0000000..a51bd83 --- /dev/null +++ b/boost-1.64.0-mpi-get_data.patch @@ -0,0 +1,119 @@ +From babaa35f51d8b009eba762bc50a5290906b4b0ca Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Thu, 26 Jan 2017 20:15:19 +0000 +Subject: [PATCH] Replace boost::serialization::detail::get_data function. + +--- + include/boost/mpi/detail/mpi_datatype_primitive.hpp | 19 ++++++++++++------- + include/boost/mpi/detail/packed_iprimitive.hpp | 8 ++++++-- + include/boost/mpi/detail/packed_oprimitive.hpp | 8 ++++++-- + 3 files changed, 24 insertions(+), 11 deletions(-) + +diff --git a/include/boost/mpi/detail/mpi_datatype_primitive.hpp b/include/boost/mpi/detail/mpi_datatype_primitive.hpp +index c230055..b95fc38 100644 +--- a/include/boost/mpi/detail/mpi_datatype_primitive.hpp ++++ b/include/boost/mpi/detail/mpi_datatype_primitive.hpp +@@ -25,7 +25,6 @@ namespace std{ + #include + #include + #include +-#include + #include + #include + #include +@@ -80,18 +79,18 @@ class mpi_datatype_primitive + BOOST_MPI_CHECK_RESULT(MPI_Type_create_struct, + ( + addresses.size(), +- boost::serialization::detail::get_data(lengths), +- boost::serialization::detail::get_data(addresses), +- boost::serialization::detail::get_data(types), ++ get_data(lengths), ++ get_data(addresses), ++ get_data(types), + &datatype_ + )); + #else + BOOST_MPI_CHECK_RESULT(MPI_Type_struct, + ( + addresses.size(), +- boost::serialization::detail::get_data(lengths), +- boost::serialization::detail::get_data(addresses), +- boost::serialization::detail::get_data(types), ++ get_data(lengths), ++ get_data(addresses), ++ get_data(types), + &datatype_ + )); + #endif +@@ -129,6 +128,12 @@ class mpi_datatype_primitive + lengths.push_back(l); + } + ++ template ++ static T* get_data(std::vector& v) ++ { ++ return v.empty() ? 0 : &(v[0]); ++ } ++ + std::vector addresses; + std::vector types; + std::vector lengths; +diff --git a/include/boost/mpi/detail/packed_iprimitive.hpp b/include/boost/mpi/detail/packed_iprimitive.hpp +index 7080cbf..227dc8e 100644 +--- a/include/boost/mpi/detail/packed_iprimitive.hpp ++++ b/include/boost/mpi/detail/packed_iprimitive.hpp +@@ -16,7 +16,6 @@ + #include + #include + #include +-#include + #include + #include + +@@ -104,7 +103,12 @@ class BOOST_MPI_DECL packed_iprimitive + void load_impl(void * p, MPI_Datatype t, int l) + { + BOOST_MPI_CHECK_RESULT(MPI_Unpack, +- (const_cast(boost::serialization::detail::get_data(buffer_)), buffer_.size(), &position, p, l, t, comm)); ++ (get_data(buffer_), buffer_.size(), &position, p, l, t, comm)); ++ } ++ ++ static buffer_type::value_type* get_data(buffer_type& b) ++ { ++ return b.empty() ? 0 : &(b[0]); + } + + buffer_type & buffer_; +diff --git a/include/boost/mpi/detail/packed_oprimitive.hpp b/include/boost/mpi/detail/packed_oprimitive.hpp +index fbcde9a..3c81a70 100644 +--- a/include/boost/mpi/detail/packed_oprimitive.hpp ++++ b/include/boost/mpi/detail/packed_oprimitive.hpp +@@ -15,7 +15,6 @@ + + #include + #include +-#include + #include + #include + #include +@@ -103,13 +102,18 @@ class BOOST_MPI_DECL packed_oprimitive + + // pack the data into the buffer + BOOST_MPI_CHECK_RESULT(MPI_Pack, +- (const_cast(p), l, t, boost::serialization::detail::get_data(buffer_), buffer_.size(), &position, comm)); ++ (const_cast(p), l, t, get_data(buffer_), buffer_.size(), &position, comm)); + // reduce the buffer size if needed + BOOST_ASSERT(std::size_t(position) <= buffer_.size()); + if (std::size_t(position) < buffer_.size()) + buffer_.resize(position); + } + ++ static buffer_type::value_type* get_data(buffer_type& b) ++ { ++ return b.empty() ? 0 : &(b[0]); ++ } ++ + buffer_type& buffer_; + mutable std::size_t size_; + MPI_Comm comm; diff --git a/boost-1.64.0-mpi-make_array.patch b/boost-1.64.0-mpi-make_array.patch new file mode 100644 index 0000000..7ac800c --- /dev/null +++ b/boost-1.64.0-mpi-make_array.patch @@ -0,0 +1,21 @@ +From ab924bb5abfa4c00ad11c21632adf97c002ac481 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Thu, 26 Jan 2017 21:52:37 +0000 +Subject: [PATCH] Add header for serialization::make_array + +--- + include/boost/mpi/python/serialize.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/boost/mpi/python/serialize.hpp b/include/boost/mpi/python/serialize.hpp +index 5f9136b..8933b34 100644 +--- a/include/boost/mpi/python/serialize.hpp ++++ b/include/boost/mpi/python/serialize.hpp +@@ -36,6 +36,7 @@ + + #include + #include ++#include + + #include + diff --git a/boost.spec b/boost.spec index a5a467d..b929271 100644 --- a/boost.spec +++ b/boost.spec @@ -33,9 +33,9 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries -Version: 1.63.0 -%global version_enc 1_63_0 -Release: 9%{?dist} +Version: 1.64.0 +%global version_enc 1_64_0 +Release: 0.1%{?dist} License: Boost and MIT and Python %global toplev_dirname %{name}_%{version_enc} @@ -133,6 +133,11 @@ Patch82: boost-1.60.0-no-rpath.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1451982 Patch83: boost-1.63.0-dual-python-build-v2.patch +# https://github.com/boostorg/mpi/pull/39 +Patch84: boost-1.64.0-mpi-get_data.patch +# https://github.com/boostorg/mpi/pull/40 +Patch85: boost-1.64.0-mpi-make_array.patch + %bcond_with tests %bcond_with docs_generated @@ -748,6 +753,8 @@ a number of significant features and is now developed independently %patch68 -p1 %patch82 -p0 %patch83 -p1 +%patch84 -p2 +%patch85 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -1537,6 +1544,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Sat Jul 01 2017 Jonathan Wakely - 1.64.0-0.1 +- Rebase to 1.64.0 + * Sat Jul 01 2017 Yaakov Selkowitz - 1.63.0-9 - Add numpy and numpy3 packages (#1451982) - Fix location of openmpi-python and mpich-python modules