// $Id$
// Version: $Name$
//
-// Copyright (C) 2005, 2006, 2007, 2008 by the deal.II authors
+// Copyright (C) 2005, 2006, 2007, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
unsigned int get_this_mpi_process (const MPI_Comm &mpi_communicator);
+ /**
+ * Given a communicator, generate a new
+ * communicator that contains the same
+ * set of processors but that has a
+ * different, unique identifier.
+ *
+ * This functionality can be used to
+ * ensure that different objects, such as
+ * distributed matrices, each have unique
+ * communicators over which they can
+ * interact without interfering with each
+ * other.
+ */
+ MPI_Comm duplicate_communicator (const MPI_Comm &mpi_communicator);
/**
* A class that is used to initialize the
// $Id$
// Version: $Name$
//
-// Copyright (C) 2005, 2006, 2008 by the deal.II authors
+// Copyright (C) 2005, 2006, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
return rank;
}
+
+
+ MPI_Comm duplicate_communicator (const MPI_Comm &mpi_communicator)
+ {
+ MPI_Comm new_communicator;
+ MPI_Comm_Dup (mpi_communicator, &new_communicator);
+ return new_communicator;
+ }
+
#else
return 1;
}
+
+
unsigned int get_this_mpi_process (const MPI_Comm &)
{
return 0;
}
+
+
+
+ MPI_Comm duplicate_communicator (const MPI_Comm &mpi_communicator)
+ {
+ return mpi_communicator;
+ }
#endif
<ol>
<li>
<p>
+ New: The new function Utilities::duplicate_communicator can be used
+ to duplicate an MPI communicator to produce a unique duplicate.
+ <br>
+ (WB 2009/05/13)
</p>
</li>
</ol>
<ol>
<li>
<p>
- New: The SparseMatrix class has now a function <code>mmult</code> that
+ New: The SparseMatrix class has now a function SparseMatrix::mmult that
can multiply two sparse matrices with each other.
<br>
(Martin Kronbichler 2009/05/04)