Update of /cvsroot/boost/boost/boost/mpi/collectives
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21972/collectives
Modified Files:
all_gather.hpp all_reduce.hpp all_to_all.hpp broadcast.hpp
gather.hpp reduce.hpp scan.hpp scatter.hpp
Log Message:
Introduce workarounds a fixes for Microsoft's tool chain, based on MS-MPI and
Visual C++ 8.0
Index: all_gather.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/all_gather.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- all_gather.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ all_gather.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -27,7 +27,7 @@
all_gather_impl(const communicator& comm, const T* in_values, int n,
T* out_values, mpl::true_)
{
- MPI_Datatype type = boost::mpi::get_mpi_datatype<T>();
+ MPI_Datatype type = boost::mpi::get_mpi_datatype<T>(*in_values);
BOOST_MPI_CHECK_RESULT(MPI_Allgather,
(const_cast<T*>(in_values), n, type,
out_values, n, type, comm));
Index: all_reduce.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/all_reduce.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- all_reduce.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ all_reduce.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -32,7 +32,7 @@
{
BOOST_MPI_CHECK_RESULT(MPI_Allreduce,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
is_mpi_op<Op, T>::op(), comm));
}
@@ -51,7 +51,7 @@
user_op<Op, T> mpi_op(op);
BOOST_MPI_CHECK_RESULT(MPI_Allreduce,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
mpi_op.get_mpi_op(), comm));
}
Index: all_to_all.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/all_to_all.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- all_to_all.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ all_to_all.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -30,7 +30,7 @@
all_to_all_impl(const communicator& comm, const T* in_values, int n,
T* out_values, mpl::true_)
{
- MPI_Datatype type = get_mpi_datatype<T>();
+ MPI_Datatype type = get_mpi_datatype<T>(*in_values);
BOOST_MPI_CHECK_RESULT(MPI_Alltoall,
(const_cast<T*>(in_values), n, type,
out_values, n, type, comm));
@@ -87,6 +87,10 @@
}
std::vector<char, allocator<char> > incoming(sum > 0? sum : 1);
+ // Make sure we don't try to reference an empty vector
+ if (outgoing.empty())
+ outgoing.push_back(0);
+
// Transmit the actual data
BOOST_MPI_CHECK_RESULT(MPI_Alltoallv,
(&outgoing[0], &send_sizes[0],
Index: broadcast.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/broadcast.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- broadcast.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ broadcast.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -95,7 +95,7 @@
{
BOOST_MPI_CHECK_RESULT(MPI_Bcast,
(values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*values),
root, MPI_Comm(comm)));
}
Index: gather.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/gather.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gather.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ gather.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -28,7 +28,7 @@
gather_impl(const communicator& comm, const T* in_values, int n,
T* out_values, int root, mpl::true_)
{
- MPI_Datatype type = get_mpi_datatype<T>();
+ MPI_Datatype type = get_mpi_datatype<T>(*in_values);
BOOST_MPI_CHECK_RESULT(MPI_Gather,
(const_cast<T*>(in_values), n, type,
out_values, n, type, root, comm));
@@ -41,7 +41,7 @@
gather_impl(const communicator& comm, const T* in_values, int n, int root,
mpl::true_)
{
- MPI_Datatype type = get_mpi_datatype<T>();
+ MPI_Datatype type = get_mpi_datatype<T>(*in_values);
BOOST_MPI_CHECK_RESULT(MPI_Gather,
(const_cast<T*>(in_values), n, type,
0, n, type, root, comm));
@@ -99,10 +99,12 @@
gather(const communicator& comm, const T& in_value, std::vector<T>& out_values,
int root)
{
- if (comm.rank() == root)
+ if (comm.rank() == root) {
out_values.resize(comm.size());
-
- ::boost::mpi::gather(comm, in_value, &out_values[0], root);
+ ::boost::mpi::gather(comm, in_value, &out_values[0], root);
+ } else {
+ ::boost::mpi::gather(comm, in_value, root);
+ }
}
template<typename T>
Index: reduce.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/reduce.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- reduce.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ reduce.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -51,7 +51,7 @@
{
BOOST_MPI_CHECK_RESULT(MPI_Reduce,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
is_mpi_op<Op, T>::op(), root, comm));
}
@@ -64,7 +64,7 @@
{
BOOST_MPI_CHECK_RESULT(MPI_Reduce,
(const_cast<T*>(in_values), 0, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
is_mpi_op<Op, T>::op(), root, comm));
}
@@ -84,7 +84,7 @@
user_op<Op, T> mpi_op(op);
BOOST_MPI_CHECK_RESULT(MPI_Reduce,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
mpi_op.get_mpi_op(), root, comm));
}
@@ -99,7 +99,7 @@
user_op<Op, T> mpi_op(op);
BOOST_MPI_CHECK_RESULT(MPI_Reduce,
(const_cast<T*>(in_values), 0, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
mpi_op.get_mpi_op(), root, comm));
}
Index: scan.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/scan.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- scan.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ scan.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -51,7 +51,7 @@
{
BOOST_MPI_CHECK_RESULT(MPI_Scan,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
is_mpi_op<Op, T>::op(), comm));
}
@@ -70,7 +70,7 @@
user_op<Op, T> mpi_op(op);
BOOST_MPI_CHECK_RESULT(MPI_Scan,
(const_cast<T*>(in_values), out_values, n,
- boost::mpi::get_mpi_datatype<T>(),
+ boost::mpi::get_mpi_datatype<T>(*in_values),
mpi_op.get_mpi_op(), comm));
}
Index: scatter.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpi/collectives/scatter.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- scatter.hpp 17 Jan 2007 02:48:46 -0000 1.1
+++ scatter.hpp 16 Feb 2007 21:01:24 -0000 1.2
@@ -28,7 +28,7 @@
scatter_impl(const communicator& comm, const T* in_values, T* out_values,
int n, int root, mpl::true_)
{
- MPI_Datatype type = get_mpi_datatype<T>();
+ MPI_Datatype type = get_mpi_datatype<T>(*in_values);
BOOST_MPI_CHECK_RESULT(MPI_Scatter,
(const_cast<T*>(in_values), n, type,
out_values, n, type, root, comm));
@@ -41,7 +41,7 @@
scatter_impl(const communicator& comm, T* out_values, int n, int root,
mpl::true_)
{
- MPI_Datatype type = get_mpi_datatype<T>();
+ MPI_Datatype type = get_mpi_datatype<T>(*out_values);
BOOST_MPI_CHECK_RESULT(MPI_Scatter,
(0, n, type,
out_values, n, type,
@@ -112,10 +112,10 @@
int root)
{
if (comm.rank() == root)
- ::boost::mpi::scatter(comm, &in_values[0], out_value, root);
+ ::boost::mpi::scatter<T>(comm, &in_values[0], out_value, root);
else
- ::boost::mpi::scatter(comm, static_cast<const T*>(0), out_value,
- root);
+ ::boost::mpi::scatter<T>(comm, static_cast<const T*>(0), out_value,
+ root);
}
template<typename T>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs