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