overview.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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">
  4. <head>
  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>An Overview of the Parallel Boost Graph Library</title>
  8. <link rel="stylesheet" href="../../../../rst.css" type="text/css" />
  9. </head>
  10. <body>
  11. <div class="document" id="an-overview-of-the-parallel-boost-graph-library">
  12. <h1 class="title">An Overview of the Parallel Boost Graph Library</h1>
  13. <!-- Copyright (C) 2004-2008 The Trustees of Indiana University.
  14. Use, modification and distribution is subject to the Boost Software
  15. License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  16. http://www.boost.org/LICENSE_1_0.txt) -->
  17. <img align="right" alt="An example graph" class="align-right" src="../graph.png" style="width: 206px; height: 184px;" />
  18. <p>The Parallel Boost Graph Library (Parallel BGL) is a C++ library for
  19. parallel, distributed computation on graphs. The Parallel BGL contains
  20. distributed graph data structures, distributed graph algorithms,
  21. abstractions over the communication medium (such as MPI), and
  22. supporting data structures. A graph (also called a <em>network</em>) consists
  23. of a set of <em>vertices</em> and a set of relationships between vertices,
  24. called <em>edges</em>. The edges may be <em>undirected</em>, meaning that the
  25. relationship between vertices is mutual, e.g., &quot;X is related to Y&quot;, or
  26. they can be <em>directed</em>, meaning that the relationship goes only one
  27. way, e.g., &quot;X is the child of Y&quot;. The following figure illustrates a
  28. typical directed graph, where <em>a-i</em> are the vertices and the arrows
  29. represent edges.</p>
  30. <img align="right" alt="A distributed graph" class="align-right" src="../distributed-graph.png" style="width: 229px; height: 199px;" />
  31. <p>The Parallel BGL is primarily concerned with <em>distributed</em>
  32. graphs. Distributed graphs are conceptually graphs, but their storage
  33. is spread across multiple processors. The following figure
  34. demonstrates a distributed version of the graph above, where the graph
  35. has been divided among three processors (represented by the grey
  36. rectangles). Edges in the graph may be either local (with both
  37. endpoints stored on the same processor) or remote (the target of the
  38. edge is stored on a different processor).</p>
  39. <p>The Parallel BGL is a generic library. At its core are <em>generic</em>
  40. distributed graph algorithms, which can operate on any distributed
  41. graph data structure provided that data structure meets certain
  42. requirements. For instance, the algorithm may need to enumerate the
  43. set of vertices stored on the current processor, enumerate the set of
  44. outgoing edges from a particular vertex, and determine on which
  45. processor the target of each edge resides. The graph algorithms in the
  46. Parallel BGL are also generic with respect to the <em>properties</em>
  47. attached to edges and vertices in a graph; for instance, the weight of
  48. each edge can be stored as part of the graph or allocated in a
  49. completely separate data structure.</p>
  50. <p>The genericity available in the algorithms of the Parallel BGL allows
  51. them to be applied to existing graph data structures. However, most
  52. users will instead be writing new code that takes advantage of the
  53. Parallel BGL. The Parallel BGL provides distributed graph data
  54. structures that meet the requirements of the Parallel BGL
  55. algorithms. The primary data structure is the <a class="reference external" href="distributed_adjacency_list.html">distributed adjacency
  56. list</a>, which allows storage and manipulation of a (distributed)
  57. graph. The vertices in the graph are divided among the various
  58. processors, and each of the edges outgoing from a vertex are stored on
  59. the processor that &quot;owns&quot; (stores) that vertex. The following figure
  60. illustrates the distributed adjacency list representation.</p>
  61. <div align="center" class="align-center"><img alt="A distributed adjacency list" class="align-center" src="../dist-adjlist.png" style="width: 446px; height: 154px;" /></div>
  62. <img align="right" alt="A distributed property map" class="align-right" src="../dist-pmap.png" style="width: 271px; height: 175px;" />
  63. <p>The <a class="reference external" href="distributed_adjacency_list.html">distributed adjacency list</a> distributes the structure of a graph
  64. over multiple processors. While graph structure is in important part
  65. of many graph problems, there are typically other properties attached
  66. to the vertices and edges, such as edge weights or the position of
  67. vertices within a grid. These properties are stored in <em>property
  68. maps</em>, which associate a single piece of data with each edge or vertex
  69. in a graph. Distributed property maps extend this notion to
  70. distributed computing, where properties are stored on the same
  71. processor as the vertex or edge. The following figure illustrates the
  72. distribution of a property map storing colors (white, gray, black) for
  73. each vertex. In addition to the storage for each vertex, the
  74. processors store some &quot;ghost cells&quot; that cache values actually stored
  75. on other processors, represented by the dashed boxes.</p>
  76. <p>Tying together all of the distributed data structures of the Parallel
  77. BGL are its process groups and distributed graph algorithms. Process
  78. groups coordinate the interactions between multiple processes and
  79. distributed data structures by abstracting the communication
  80. mechanism. The algorithms are typically written using the SPMD model
  81. (Single Program, Multiple Data) and interact with both the distributed
  82. data structures and the process group itself. At various points in the
  83. algorithm's execution, all processes execute a synchronization point,
  84. which allows all of the distributed data structures to ensure an
  85. appropriate degree of consistency across processes. The following
  86. diagram illustrates the communication patterns within the the
  87. execution of a distributed algorithm in the Parallel BGL. In
  88. particular, the diagram illustrates the distributed data structures
  89. used in a distributed breadth-first search, from the top-left and
  90. proceeding clockwise:</p>
  91. <blockquote>
  92. <ul class="simple">
  93. <li>a user-defined property map that tracks the distance from the
  94. source vertex to all other vertices,</li>
  95. <li>an automatically-generated property map that tracks the &quot;color&quot;
  96. of vertices in the (distributed) graph, to determine which
  97. vertices have been seen before,</li>
  98. <li>a distributed queue, which coordinates the breadth-first search
  99. and distributes new vertices to search, and</li>
  100. <li>a distributed graph, on which the breadth-first search is
  101. operating.</li>
  102. </ul>
  103. </blockquote>
  104. <div align="center" class="align-center"><img alt="Parallel Boost Graph Library architecture" class="align-center" src="../architecture.png" style="width: 485px; height: 410px;" /></div>
  105. <hr class="docutils" />
  106. <p>Copyright (C) 2005 The Trustees of Indiana University.</p>
  107. <p>Authors: Douglas Gregor and Andrew Lumsdaine</p>
  108. <span class="target" id="process-groups"></span>
  109. </div>
  110. <div class="footer">
  111. <hr class="footer" />
  112. Generated on: 2009-05-31 00:22 UTC.
  113. 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.
  114. </div>
  115. </body>
  116. </html>