1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>Parallel BGL MPI BSP Process Group</title>
<link rel="stylesheet" href="../../../../rst.css" type="text/css" />
</head>
<body>
<div class="document" id="logo-mpi-bsp-process-group">
<h1 class="title"><a class="reference external" href="http://www.osl.iu.edu/research/pbgl"><img align="middle" alt="Parallel BGL" class="align-middle" src="pbgl-logo.png" /></a> MPI BSP Process Group</h1>
<!-- Copyright (C) 2004-2009 The Trustees of Indiana University.
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt) -->
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id1">Introduction</a></li>
<li><a class="reference internal" href="#where-defined" id="id2">Where Defined</a></li>
<li><a class="reference internal" href="#reference" id="id3">Reference</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h1><a class="toc-backref" href="#id1">Introduction</a></h1>
<p>The MPI <tt class="docutils literal"><span class="pre">mpi_process_group</span></tt> is an implementation of the <a class="reference external" href="process_group.html">process
group</a> interface using the Message Passing Interface (MPI). It is the
primary process group used in the Parallel BGL at this time.</p>
</div>
<div class="section" id="where-defined">
<h1><a class="toc-backref" href="#id2">Where Defined</a></h1>
<p>Header <tt class="docutils literal"><span class="pre"><boost/graph/distributed/mpi_process_group.hpp></span></tt></p>
</div>
<div class="section" id="reference">
<h1><a class="toc-backref" href="#id3">Reference</a></h1>
<pre class="literal-block">
namespace boost { namespace graph { namespace distributed {
class mpi_process_group
{
public:
typedef boost::mpi::communicator communicator_type;
// Process group constructors
mpi_process_group(communicator_type comm = communicator_type());
mpi_process_group(std::size_t num_headers, std::size_t buffer_size,
communicator_type comm = communicator_type());
mpi_process_group();
mpi_process_group(const mpi_process_group&, boost::parallel::attach_distributed_object);
// Triggers
template<typename Type, typename Handler>
void trigger(int tag, const Handler& handler);
template<typename Type, typename Handler>
void trigger_with_reply(int tag, const Handler& handler);
trigger_receive_context trigger_context() const;
// Helper operations
void poll();
mpi_process_group base() const;
};
// Process query
int process_id(const mpi_process_group&);
int num_processes(const mpi_process_group&);
// Message transmission
template<typename T>
void send(const mpi_process_group& pg, int dest, int tag, const T& value);
template<typename T>
void receive(const mpi_process_group& pg, int source, int tag, T& value);
optional<std::pair<int, int> > probe(const mpi_process_group& pg);
// Synchronization
void synchronize(const mpi_process_group& pg);
// Out-of-band communication
template<typename T>
void send_oob(const mpi_process_group& pg, int dest, int tag, const T& value);
template<typename T, typename U>
void
send_oob_with_reply(const mpi_process_group& pg, int dest, int
tag, const T& send_value, U& receive_value);
template<typename T>
void receive_oob(const mpi_process_group& pg, int source, int tag, T& value);
} } }
</pre>
<p>Since the <tt class="docutils literal"><span class="pre">mpi_process_group</span></tt> is an implementation of the <a class="reference external" href="process_group.html">process
group</a> interface, we omit the description of most of the functions in
the prototype. Two constructors need special mentioning:</p>
<pre class="literal-block">
mpi_process_group(communicator_type comm = communicator_type());
</pre>
<p>The constructor can take an optional MPI communicator. As default a communicator
constructed from MPI_COMM_WORLD is used.</p>
<pre class="literal-block">
mpi_process_group(std::size_t num_headers, std::size_t buffer_size,
communicator_type comm = communicator_type());
</pre>
<p>For performance fine tuning the maximum number of headers in a message batch
(num_headers) and the maximum combined size of batched messages (buffer_size)
can be specified. The maximum message size of a batch is
16*num_headers+buffer_size. Sensible default values have been found by optimizing
a typical application on a cluster with Ethernet network, and are num_header=64k
and buffer_size=1MB, for a total maximum batches message size of 2MB.</p>
<hr class="docutils" />
<p>Copyright (C) 2007 Douglas Gregor</p>
<p>Copyright (C) 2007 Matthias Troyer</p>
</div>
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2009-05-31 00:22 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
</body>
</html>
|