2
0
mirror of https://github.com/boostorg/mpi.git synced 2026-02-26 04:42:23 +00:00

Document graph topologies, implement layer over MPI_Topo_test

[SVN r37853]
This commit is contained in:
Douglas Gregor
2007-06-01 18:22:00 +00:00
parent 321afa14d8
commit 8cd257f4cb
4 changed files with 65 additions and 10 deletions

View File

@@ -141,6 +141,22 @@ communicator communicator::split(int color, int key) const
return communicator(newcomm, comm_take_ownership);
}
bool communicator::has_cartesian_topology() const
{
int status;
BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status));
return status == MPI_CART;
}
bool communicator::has_graph_topology() const
{
int status;
BOOST_MPI_CHECK_RESULT(MPI_Topo_test, ((MPI_Comm)*this, &status));
return status == MPI_GRAPH;
}
void communicator::abort(int errcode) const
{
BOOST_MPI_CHECK_RESULT(MPI_Abort, (MPI_Comm(*this), errcode));