Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65965 - in trunk/boost: archive mpi mpi/detail serialization
From: troyer_at_[hidden]
Date: 2010-10-14 16:08:30


Author: troyer
Date: 2010-10-14 16:08:27 EDT (Thu, 14 Oct 2010)
New Revision: 65965
URL: http://svn.boost.org/trac/boost/changeset/65965

Log:
Fixes for homogenous MPI when using new version of the serialization library
Text files modified:
   trunk/boost/archive/basic_archive.hpp | 15 +++++++++++++++
   trunk/boost/mpi/datatype.hpp | 3 ++-
   trunk/boost/mpi/detail/packed_iprimitive.hpp | 18 +++++++++---------
   trunk/boost/serialization/collection_size_type.hpp | 2 ++
   4 files changed, 28 insertions(+), 10 deletions(-)

Modified: trunk/boost/archive/basic_archive.hpp
==============================================================================
--- trunk/boost/archive/basic_archive.hpp (original)
+++ trunk/boost/archive/basic_archive.hpp 2010-10-14 16:08:27 EDT (Thu, 14 Oct 2010)
@@ -282,4 +282,19 @@
 BOOST_CLASS_IMPLEMENTATION(boost::archive::object_reference_type, primitive_type)
 BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type)
 
+#include <boost/serialization/is_bitwise_serializable.hpp>
+
+// set types used internally by the serialization library
+// to be bitwise serializable
+
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_optional_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_name_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_id_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_reference_type)
+BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::tracking_type)
+
 #endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP

Modified: trunk/boost/mpi/datatype.hpp
==============================================================================
--- trunk/boost/mpi/datatype.hpp (original)
+++ trunk/boost/mpi/datatype.hpp 2010-10-14 16:08:27 EDT (Thu, 14 Oct 2010)
@@ -341,12 +341,13 @@
 BOOST_MPI_DATATYPE(boost::archive::tracking_type, get_mpi_datatype(bool()), builtin);
 BOOST_MPI_DATATYPE(boost::serialization::collection_size_type, get_mpi_datatype(std::size_t()), integer);
 BOOST_MPI_DATATYPE(boost::serialization::item_version_type, get_mpi_datatype(uint_least8_t()), integer);
-
 #endif // Doxygen
 
 
 } } // end namespace boost::mpi
 
+// direct support for special primitive data types of the serialization library
+// in the case of homogeneous systems
 // define a macro to make explicit designation of this more transparent
 #define BOOST_IS_MPI_DATATYPE(T) \
 namespace boost { \

Modified: trunk/boost/mpi/detail/packed_iprimitive.hpp
==============================================================================
--- trunk/boost/mpi/detail/packed_iprimitive.hpp (original)
+++ trunk/boost/mpi/detail/packed_iprimitive.hpp 2010-10-14 16:08:27 EDT (Thu, 14 Oct 2010)
@@ -89,15 +89,15 @@
     template<class CharType>
     void load(std::basic_string<CharType> & s)
     {
- unsigned int l;
+ unsigned int l;
         load(l);
         // borland de-allocator fixup
- #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101))
- if(NULL != s.data())
- #endif
+// #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101))
+// if(NULL != s.data())
+// #endif
         s.resize(l);
         // note breaking a rule here - could be a problem on some platform
- load_impl(const_cast<char *>(s.data()),get_mpi_datatype(CharType()),l);
+ load_impl(const_cast<CharType *>(s.data()),get_mpi_datatype(CharType()),l);
     }
 
 private:
@@ -108,10 +108,10 @@
         (const_cast<char*>(boost::serialization::detail::get_data(buffer_)), buffer_.size(), &position, p, l, t, comm));
     }
 
- buffer_type & buffer_;
- mutable std::size_t size_;
- MPI_Comm comm;
- int position;
+ buffer_type & buffer_;
+ mutable std::size_t size_;
+ MPI_Comm comm;
+ int position;
 };
 
 } } // end namespace boost::mpi

Modified: trunk/boost/serialization/collection_size_type.hpp
==============================================================================
--- trunk/boost/serialization/collection_size_type.hpp (original)
+++ trunk/boost/serialization/collection_size_type.hpp 2010-10-14 16:08:27 EDT (Thu, 14 Oct 2010)
@@ -10,6 +10,7 @@
 #include <boost/serialization/strong_typedef.hpp>
 #include <boost/serialization/level.hpp>
 #include <boost/serialization/split_free.hpp>
+#include <boost/serialization/is_bitwise_serializable.hpp>
 
 namespace boost {
 namespace serialization {
@@ -56,5 +57,6 @@
 } } // end namespace boost::serialization
 
 BOOST_CLASS_IMPLEMENTATION(collection_size_type, primitive_type)
+BOOST_IS_BITWISE_SERIALIZABLE(collection_size_type);
 
 #endif //BOOST_SERIALIZATION_COLLECTION_SIZE_TYPE_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk