Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2007-12-06 14:22:07


Author: dgregor
Date: 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
New Revision: 41802
URL: http://svn.boost.org/trac/boost/changeset/41802

Log:
Workaround for MPICH to properly deal with SEEK_* constants.
Fixes #1486

Text files modified:
   trunk/boost/mpi/config.hpp | 4 ++++
   trunk/boost/mpi/datatype.hpp | 6 ++++++
   trunk/boost/mpi/detail/mpi_datatype_primitive.hpp | 2 +-
   trunk/boost/mpi/detail/packed_iprimitive.hpp | 2 +-
   trunk/boost/mpi/detail/packed_oprimitive.hpp | 2 +-
   5 files changed, 13 insertions(+), 3 deletions(-)

Modified: trunk/boost/mpi/config.hpp
==============================================================================
--- trunk/boost/mpi/config.hpp (original)
+++ trunk/boost/mpi/config.hpp 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
@@ -13,6 +13,10 @@
 #ifndef BOOST_MPI_CONFIG_HPP
 #define BOOST_MPI_CONFIG_HPP
 
+/* Force MPICH not to define SEEK_SET, SEEK_CUR, and SEEK_END, which
+ conflict with the versions in <stdio.h> and <cstdio>. */
+#define MPICH_IGNORE_CXX_SEEK 1
+
 #include <mpi.h>
 #include <boost/config.hpp>
 

Modified: trunk/boost/mpi/datatype.hpp
==============================================================================
--- trunk/boost/mpi/datatype.hpp (original)
+++ trunk/boost/mpi/datatype.hpp 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
@@ -25,6 +25,7 @@
 #include <boost/mpl/or.hpp>
 #include <boost/mpi/detail/mpi_datatype_cache.hpp>
 #include <boost/mpl/assert.hpp>
+#include <utility> // for std::pair
 
 namespace boost { namespace mpi {
 
@@ -289,6 +290,11 @@
   : boost::mpl::bool_<true>
 {};
 
+/// INTERNAL ONLY
+template<typename T, typename U>
+struct is_mpi_datatype<std::pair<T, U> >
+ : mpl::and_<is_mpi_datatype<T>, is_mpi_datatype<U> > { };
+
 } } // end namespace boost::mpi
 
 #endif // BOOST_MPI_MPI_DATATYPE_HPP

Modified: trunk/boost/mpi/detail/mpi_datatype_primitive.hpp
==============================================================================
--- trunk/boost/mpi/detail/mpi_datatype_primitive.hpp (original)
+++ trunk/boost/mpi/detail/mpi_datatype_primitive.hpp 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
@@ -9,7 +9,7 @@
 #ifndef BOOST_MPI_DETAIL_MPI_DATATYPE_OPRIMITIVE_HPP
 #define BOOST_MPI_DETAIL_MPI_DATATYPE_OPRIMITIVE_HPP
 
-#include <mpi.h>
+#include <boost/mpi/config.hpp>
 #include <cstddef> // size_t
 
 #include <boost/config.hpp>

Modified: trunk/boost/mpi/detail/packed_iprimitive.hpp
==============================================================================
--- trunk/boost/mpi/detail/packed_iprimitive.hpp (original)
+++ trunk/boost/mpi/detail/packed_iprimitive.hpp 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
@@ -9,7 +9,7 @@
 #ifndef BOOST_MPI_PACKED_IPRIMITIVE_HPP
 #define BOOST_MPI_PACKED_IPRIMITIVE_HPP
 
-#include <mpi.h>
+#include <boost/mpi/config.hpp>
 #include <iostream>
 #include <cstddef> // size_t
 #include <boost/config.hpp>

Modified: trunk/boost/mpi/detail/packed_oprimitive.hpp
==============================================================================
--- trunk/boost/mpi/detail/packed_oprimitive.hpp (original)
+++ trunk/boost/mpi/detail/packed_oprimitive.hpp 2007-12-06 14:22:06 EST (Thu, 06 Dec 2007)
@@ -9,7 +9,7 @@
 #ifndef BOOST_MPI_PACKED_OPRIMITIVE_HPP
 #define BOOST_MPI_PACKED_OPRIMITIVE_HPP
 
-#include <mpi.h>
+#include <boost/mpi/config.hpp>
 #include <iostream>
 #include <cstddef> // size_t
 #include <boost/config.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