<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"lang="en" xml:lang="en"><head><title>Graph 500 Benchmark 1 ("Search")</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><meta name="generator" content="Org-mode"/><meta name="generated" content="2010-10-05 10:35:40 EDT"/><meta name="author" content="Graph 500 Steering Committee"/><meta name="description" content=""/><meta name="keywords" content=""/><style type="text/css"> <!--/*--><![CDATA[/*><!--*/ html { font-family: Times, serif; font-size: 12pt; } .title { text-align: center; } .todo { color: red; } .done { color: green; } .tag { background-color: #add8e6; font-weight:normal } .target { } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } p.verse { margin-left: 3% } pre { border: 1pt solid #AEBDCC; background-color: #F3F5F7; padding: 5pt; font-family: courier, monospace; font-size: 90%; overflow:auto; } table { border-collapse: collapse; } td, th { vertical-align: top; } dt { font-weight: bold; } div.figure { padding: 0.5em; } div.figure p { text-align: center; } textarea { overflow-x: auto; } .linenr { font-size:smaller } .code-highlighted {background-color:#ffff00;} .org-info-js_info-navigation { border-style:none; } #org-info-js_console-label { font-size:10px; font-weight:bold; white-space:nowrap; } .org-info-js_search-highlight {background-color:#ffff00; color:#000000; font-weight:bold; } /*]]>*/--></style><style>body {margin-left: 10%; margin-right: 10%;} table {margin-left:auto; margin-right:auto;}</style><script type="text/javascript"><!--/*--><![CDATA[/*><!--*/ function CodeHighlightOn(elem, id) { var target = document.getElementById(id); if(null != target) { elem.cacheClassElem = elem.className; elem.cacheClassTarget = target.className; target.className = "code-highlighted"; elem.className = "code-highlighted"; } } function CodeHighlightOff(elem, id) { var target = document.getElementById(id); if(elem.cacheClassElem) elem.className = elem.cacheClassElem; if(elem.cacheClassTarget) target.className = elem.cacheClassTarget; }/*]]>*///--></script> </head><body><div id="content"> <h1 class="title">Graph 500 Benchmark 1 ("Search")</h1> <p>Contributors: David A. Bader (Georgia Institute of Technology),Jonathan Berry (Sandia National Laboratories), Simon Kahan (PacificNorthwest National Laboratory and University of Washington), RichardMurphy (Sandia National Laboratories), E. Jason Riedy (GeorgiaInstitute of Technology), and Jeremiah Willcock (Indiana University).</p><p>Version History:</p><dl><dt>V0.1</dt><dd>Draft, created 28 July 2010</dd><dt>V0.2</dt><dd>Draft, created 29 September 2010</dd><dt>V0.3</dt><dd>Draft, created 30 September 2010</dd><dt>V1.0</dt><dd>Created 1 October 2010</dd><dt>V1.1</dt><dd>Created 3 October 2010 </dd></dl> <p>Version 0.1 of this document was part of the Graph 500 communitybenchmark effort, led by Richard Murphy (Sandia NationalLaboratories). The intent is that there will be at least threevariants of implementations, on shared memory and threaded systems, ondistributed memory clusters, and on external memory map-reduceclouds. This specification is for the first of potentially severalbenchmark problems.</p><p>References: "Introducing the Graph 500," Richard C. Murphy, KyleB. Wheeler, Brian W. Barrett, James A. Ang, Cray User’s Group (CUG),May 5, 2010.</p><p>"DFS: A Simple to Write Yet Difficult to Execute Benchmark," RichardC. Murphy, Jonathan Berry, William McLendon, Bruce Hendrickson,Douglas Gregor, Andrew Lumsdaine, IEEE International Symposium onWorkload Characterizations 2006 (IISWC06), San Jose, CA, 25-27 October2006.</p> <div id="table-of-contents"><h2>Table of Contents</h2><div id="text-table-of-contents"><ul><li><a href="#sec-1">1 Brief Description of the Graph 500 Benchmark </a><ul><li><a href="#sec-1_1">1.1 References </a></li></ul></li><li><a href="#sec-2">2 Overall benchmark </a></li><li><a href="#sec-3">3 Generating the edge list </a><ul><li><a href="#sec-3_1">3.1 Brief Description </a></li><li><a href="#sec-3_2">3.2 Detailed Text Description </a></li><li><a href="#sec-3_3">3.3 Sample high-level implementation of the Kronecker generator </a></li><li><a href="#sec-3_4">3.4 Parameter settings </a></li><li><a href="#sec-3_5">3.5 References </a></li></ul></li><li><a href="#sec-4">4 Kernel 1 – Graph Construction </a><ul><li><a href="#sec-4_1">4.1 Description </a></li><li><a href="#sec-4_2">4.2 References </a></li></ul></li><li><a href="#sec-5">5 Sampling 64 search keys </a></li><li><a href="#sec-6">6 Kernel 2 – Breadth-First Search </a><ul><li><a href="#sec-6_1">6.1 Description </a></li><li><a href="#sec-6_2">6.2 Kernel 2 Output </a></li></ul></li><li><a href="#sec-7">7 Validation </a></li><li><a href="#sec-8">8 Computing and outputting performance information </a><ul><li><a href="#sec-8_1">8.1 Timing </a></li><li><a href="#sec-8_2">8.2 Performance Metric (TEPS) </a></li><li><a href="#sec-8_3">8.3 Output </a></li><li><a href="#sec-8_4">8.4 References </a></li></ul></li><li><a href="#sec-9">9 Sample driver </a></li><li><a href="#sec-10">10 Evaluation Criteria </a></li></ul></div></div> <div id="outline-container-1" class="outline-2"><h2 id="sec-1"><span class="section-number-2">1</span> Brief Description of the Graph 500 Benchmark </h2><div class="outline-text-2" id="text-1"> <p>Data-intensive supercomputer applications are an increasinglyimportant workload, but are ill-suited for platforms designed for 3Dphysics simulations. Application performance cannot be improvedwithout a meaningful benchmark. Graphs are a core part of mostanalytics workloads. Backed by a steering committee of 30international HPC experts from academia, industry, and nationallaboratories, this specification establishes a large-scale benchmarkfor these applications. It will offer a forum for the community andprovide a rallying point for data-intensive supercomputingproblems. This is the first serious approach to augment the Top 500with data-intensive applications.</p><p>The intent of this benchmark problem ("Search") is to develop acompact application that has multiple analysis techniques (multiplekernels) accessing a single data structure representing a weighted,undirected graph. In addition to a kernel to construct the graph fromthe input tuple list, there is one additional computationalkernel to operate on the graph.</p><p>This benchmark includes a scalable data generator which produces edgetuples containing the start vertex and end vertex for eachedge. The first kernel constructs an <i>undirected</i> graph in a formatusable by all subsequent kernels. No subsequent modifications arepermitted to benefit specific kernels. The second kernel performs abreadth-first search of the graph. Both kernels are timed.</p><p>There are five problem classes defined by their input size:</p><dl><dt>toy</dt><dd>17GB or around 10<sup>10</sup> bytes, which we also call level 10,</dd><dt>mini</dt><dd>140GB (10<sup>11</sup> bytes, level 11),</dd><dt>small</dt><dd>1TB (10<sup>12</sup> bytes, level 12),</dd><dt>medium</dt><dd>17TB (10<sup>13</sup> bytes, level 13),</dd><dt>large</dt><dd>140TB (10<sup>14</sup> bytes, level 14), and</dd><dt>huge</dt><dd>1.1PB (10<sup>15</sup> bytes, level 15). </dd></dl> <p>Table <a href="#tbl:classes">classes</a> provides the parameters used by the graphgenerator specified below.</p> </div> <div id="outline-container-1_1" class="outline-3"><h3 id="sec-1_1"><span class="section-number-3">1.1</span> References </h3><div class="outline-text-3" id="text-1_1"> <p>D.A. Bader, J. Feo, J. Gilbert, J. Kepner, D. Koester, E. Loh,K. Madduri, W. Mann, Theresa Meuse, HPCS Scalable Synthetic CompactApplications #2 Graph Analysis (SSCA#2 v2.2 Specification), 5September 2007.</p></div></div> </div> <div id="outline-container-2" class="outline-2"><h2 id="sec-2"><span class="section-number-2">2</span> Overall benchmark </h2><div class="outline-text-2" id="text-2"> <p>The benchmark performs the following steps:</p><ol><li>Generate the edge list.</li><li>Construct a graph from the edge list (<b>timed</b>, kernel 1).</li><li>Randomly sample 64 unique search keys with degree at least one,not counting self-loops.</li><li>For each search key:<ol><li>Compute the parent array (<b>timed</b>, kernel 2).</li><li>Validate that the parent array is a correct BFS search treefor the given search tree.</li></ol></li><li>Compute and output performance information. </li></ol> <p>Only the sections marked as <b>timed</b> are included in the performanceinformation. Note that all uses of "random" permit pseudorandomnumber generation.</p></div> </div> <div id="outline-container-3" class="outline-2"><h2 id="sec-3"><span class="section-number-2">3</span> Generating the edge list </h2><div class="outline-text-2" id="text-3"> </div> <div id="outline-container-3_1" class="outline-3"><h3 id="sec-3_1"><span class="section-number-3">3.1</span> Brief Description </h3><div class="outline-text-3" id="text-3_1"> <p>The scalable data generator will construct a list of edge tuplescontaining vertex identifiers. Each edge is undirected with itsendpoints given in the tuple as StartVertex and EndVertex. </p><p>The intent of the first kernel below is to convert a list with nolocality into a more optimized form. The generated list of inputtuples must not exhibit any locality that can be exploited by thecomputational kernels. Thus, the vertex numbers must be randomizedand a random ordering of tuples must be presented to kernel 1.The data generator may be parallelized, but the vertex namesmust be globally consistent and care must be taken to minimize effectsof data locality at the processor level.</p></div> </div> <div id="outline-container-3_2" class="outline-3"><h3 id="sec-3_2"><span class="section-number-3">3.2</span> Detailed Text Description </h3><div class="outline-text-3" id="text-3_2"> <p>The edge tuples will have the form <StartVertex, EndVertex> whereStartVertex is one endpoint vertex label and EndVertex is theother endpoint vertex label. The space of labels is the set of integersbeginning with <b>zero</b> up to but not including the number of vertices N(defined below). The kernels are not provided the size N explicitlybut must discover it.</p><p>The input values required to describe the graph are:</p><dl><dt>SCALE</dt><dd>The logarithm base two of the number of vertices. </dd><dt>edgefactor</dt><dd>The ratio of the graph's edge count to its vertex count (i.e.,half the average degree of a vertex in the graph). </dd></dl> <p>These inputs determine the graph's size:</p><dl><dt>N</dt><dd>the total number of vertices, 2<sup>SCALE</sup>. An implementation mayuse any set of N distinct integers to number the vertices, but atleast 48 bits must be allocated per vertex number. Other parametersmay be assumed to fit within the natural word of the machine. N isderived from the problem’s scaling parameter. </dd><dt>M</dt><dd>the number of edges. M = edgefactor * N. </dd></dl> <p>The graph generator is a Kronecker generator similar to the RecursiveMATrix (R-MAT) scale-free graph generation algorithm [Chakrabarti, etal., 2004]. For ease of discussion, the description of this R-MATgenerator uses an adjacency matrix data structure; however,implementations may use any alternate approach that outputs theequivalent list of edge tuples. This model recursively sub-divides theadjacency matrix of the graph into four equal-sized partitions anddistributes edges within these partitions with unequalprobabilities. Initially, the adjacency matrix is empty, and edges areadded one at a time. Each edge chooses one of the four partitions withprobabilities A, B, C, and D, respectively. These probabilities, theinitiator parameters, are provided in Table <a href="#tbl:initiator">initiator</a>.</p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"><a name="tbl:initiator" id="tbl:initiator"></a><caption>Initiator parameters for the Kronecker graph generator</caption><colgroup><col align="left" /><col align="left" /></colgroup><tbody><tr><td>A = 0.57</td><td>B = 0.19</td></tr><tr><td>C = 0.19</td><td>D = 1-(A+B+C) = 0.05</td></tr></tbody></table> <p>The next section details a high-level implementation for thisgenerator. High-performance, parallel implementations are included inthe reference implementation.</p><p>The graph generator creates a small number of multiple edges betweentwo vertices as well as self-loops. Multiple edges, self-loops, andisolated vertices may be ignored in the subsequent kernels but mustbe included in the edge list provided to the first kernel. Thealgorithm also generates the data tuples with high degrees oflocality. Thus, as a final step, vertex numbers must be randomlypermuted, and then the edge tuples randomly shuffled.</p><p>It is permissible to run the data generator in parallel. In this case,it is necessary to ensure that the vertices are named globally, andthat the generated data does not possess any locality, either in local memoryor globally across processors.</p><p>The scalable data generator should be run before starting kernel 1, storing itsresults to either RAM or disk.If stored to disk, the data may be retrieved beforestarting kernel 1. The data generator and retrieval operations need not betimed.</p></div> </div> <div id="outline-container-3_3" class="outline-3"><h3 id="sec-3_3"><span class="section-number-3">3.3</span> Sample high-level implementation of the Kronecker generator </h3><div class="outline-text-3" id="text-3_3"> <p>The GNU Octave routine in Algorithm <a href="#alg:generator">generator</a> is anattractive implementation in that it is embarrassingly parallel anddoes not require the explicit formation of the adjacency matrix.</p> <pre class="src src-Octave">function ij = kronecker_generator (SCALE, edgefactor)%% Generate an edgelist according to the Graph500%% parameters. In this sample, the edge list is%% returned in an array with two rows, where StartVertex%% is first row and EndVertex is the second. The vertex%% labels start at zero.%%%% Example, creating a sparse matrix for viewing:%% ij = kronecker_generator (10, 16);%% G = sparse (ij(1,:)+1, ij(2,:)+1, ones (1, size (ij, 2)));%% spy (G);%% The spy plot should appear fairly dense. Any locality%% is removed by the final permutations. %% Set number of vertices. N = 2^SCALE; %% Set number of edges. M = edgefactor * N; %% Set initiator probabilities. [A, B, C] = deal (0.57, 0.19, 0.19); %% Create index arrays. ij = ones (2, M); %% Loop over each order of bit. ab = A + B; c_norm = C/(1 - (A + B)); a_norm = A/(A + B); for ib = 1:SCALE, %% Compare with probabilities and set bits of indices. ii_bit = rand (1, M) > ab; jj_bit = rand (1, M) > ( c_norm * ii_bit + a_norm * not (ii_bit) ); ij = ij + 2^(ib-1) * [ii_bit; jj_bit]; end %% Permute vertex labels p = randperm (N); ij = p(ij); %% Permute the edge list p = randperm (M); ij = ij(:, p); %% Adjust to zero-based labels. ij = ij - 1;</pre> </div> </div> <div id="outline-container-3_4" class="outline-3">Lines 1–500 of 1147. Load more
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Graph 500 Benchmark 1 ("Search")</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <meta name="generator" content="Org-mode"/> <meta name="generated" content="2010-10-05 10:35:40 EDT"/> <meta name="author" content="Graph 500 Steering Committee"/> <meta name="description" content=""/> <meta name="keywords" content=""/> <style type="text/css"> <!--/*--><![CDATA[/*><!--*/ html { font-family: Times, serif; font-size: 12pt; } .title { text-align: center; } .todo { color: red; } .done { color: green; } .tag { background-color: #add8e6; font-weight:normal } .target { } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } p.verse { margin-left: 3% } pre { border: 1pt solid #AEBDCC; background-color: #F3F5F7; padding: 5pt; font-family: courier, monospace; font-size: 90%; overflow:auto; } table { border-collapse: collapse; } td, th { vertical-align: top; } dt { font-weight: bold; } div.figure { padding: 0.5em; } div.figure p { text-align: center; } textarea { overflow-x: auto; } .linenr { font-size:smaller } .code-highlighted {background-color:#ffff00;} .org-info-js_info-navigation { border-style:none; } #org-info-js_console-label { font-size:10px; font-weight:bold; white-space:nowrap; } .org-info-js_search-highlight {background-color:#ffff00; color:#000000; font-weight:bold; } /*]]>*/--> </style> <style>body {margin-left: 10%; margin-right: 10%;} table {margin-left:auto; margin-right:auto;}</style> <script type="text/javascript"> <!--/*--><![CDATA[/*><!--*/ function CodeHighlightOn(elem, id) { var target = document.getElementById(id); if(null != target) { elem.cacheClassElem = elem.className; elem.cacheClassTarget = target.className; target.className = "code-highlighted"; elem.className = "code-highlighted"; } } function CodeHighlightOff(elem, id) { var target = document.getElementById(id); if(elem.cacheClassElem) elem.className = elem.cacheClassElem; if(elem.cacheClassTarget) target.className = elem.cacheClassTarget; } /*]]>*///--> </script> </head> <body> <div id="content"> <h1 class="title">Graph 500 Benchmark 1 ("Search")</h1> <p>Contributors: David A. Bader (Georgia Institute of Technology), Jonathan Berry (Sandia National Laboratories), Simon Kahan (Pacific Northwest National Laboratory and University of Washington), Richard Murphy (Sandia National Laboratories), E. Jason Riedy (Georgia Institute of Technology), and Jeremiah Willcock (Indiana University). </p> <p> Version History: </p><dl> <dt>V0.1</dt><dd> Draft, created 28 July 2010 </dd> <dt>V0.2</dt><dd> Draft, created 29 September 2010 </dd> <dt>V0.3</dt><dd> Draft, created 30 September 2010 </dd> <dt>V1.0</dt><dd> Created 1 October 2010 </dd> <dt>V1.1</dt><dd> Created 3 October 2010 </dd> </dl> <p>Version 0.1 of this document was part of the Graph 500 community benchmark effort, led by Richard Murphy (Sandia National Laboratories). The intent is that there will be at least three variants of implementations, on shared memory and threaded systems, on distributed memory clusters, and on external memory map-reduce clouds. This specification is for the first of potentially several benchmark problems. </p> <p> References: "Introducing the Graph 500," Richard C. Murphy, Kyle B. Wheeler, Brian W. Barrett, James A. Ang, Cray User’s Group (CUG), May 5, 2010. </p> <p> "DFS: A Simple to Write Yet Difficult to Execute Benchmark," Richard C. Murphy, Jonathan Berry, William McLendon, Bruce Hendrickson, Douglas Gregor, Andrew Lumsdaine, IEEE International Symposium on Workload Characterizations 2006 (IISWC06), San Jose, CA, 25-27 October 2006. </p> <div id="table-of-contents"> <h2>Table of Contents</h2> <div id="text-table-of-contents"> <ul> <li><a href="#sec-1">1 Brief Description of the Graph 500 Benchmark </a> <ul> <li><a href="#sec-1_1">1.1 References </a></li> </ul> </li> <li><a href="#sec-2">2 Overall benchmark </a></li> <li><a href="#sec-3">3 Generating the edge list </a> <ul> <li><a href="#sec-3_1">3.1 Brief Description </a></li> <li><a href="#sec-3_2">3.2 Detailed Text Description </a></li> <li><a href="#sec-3_3">3.3 Sample high-level implementation of the Kronecker generator </a></li> <li><a href="#sec-3_4">3.4 Parameter settings </a></li> <li><a href="#sec-3_5">3.5 References </a></li> </ul> </li> <li><a href="#sec-4">4 Kernel 1 – Graph Construction </a> <ul> <li><a href="#sec-4_1">4.1 Description </a></li> <li><a href="#sec-4_2">4.2 References </a></li> </ul> </li> <li><a href="#sec-5">5 Sampling 64 search keys </a></li> <li><a href="#sec-6">6 Kernel 2 – Breadth-First Search </a> <ul> <li><a href="#sec-6_1">6.1 Description </a></li> <li><a href="#sec-6_2">6.2 Kernel 2 Output </a></li> </ul> </li> <li><a href="#sec-7">7 Validation </a></li> <li><a href="#sec-8">8 Computing and outputting performance information </a> <ul> <li><a href="#sec-8_1">8.1 Timing </a></li> <li><a href="#sec-8_2">8.2 Performance Metric (TEPS) </a></li> <li><a href="#sec-8_3">8.3 Output </a></li> <li><a href="#sec-8_4">8.4 References </a></li> </ul> </li> <li><a href="#sec-9">9 Sample driver </a></li> <li><a href="#sec-10">10 Evaluation Criteria </a></li> </ul> </div> </div> <div id="outline-container-1" class="outline-2"> <h2 id="sec-1"><span class="section-number-2">1</span> Brief Description of the Graph 500 Benchmark </h2> <div class="outline-text-2" id="text-1"> <p> Data-intensive supercomputer applications are an increasingly important workload, but are ill-suited for platforms designed for 3D physics simulations. Application performance cannot be improved without a meaningful benchmark. Graphs are a core part of most analytics workloads. Backed by a steering committee of 30 international HPC experts from academia, industry, and national laboratories, this specification establishes a large-scale benchmark for these applications. It will offer a forum for the community and provide a rallying point for data-intensive supercomputing problems. This is the first serious approach to augment the Top 500 with data-intensive applications. </p> <p> The intent of this benchmark problem ("Search") is to develop a compact application that has multiple analysis techniques (multiple kernels) accessing a single data structure representing a weighted, undirected graph. In addition to a kernel to construct the graph from the input tuple list, there is one additional computational kernel to operate on the graph. </p> <p> This benchmark includes a scalable data generator which produces edge tuples containing the start vertex and end vertex for each edge. The first kernel constructs an <i>undirected</i> graph in a format usable by all subsequent kernels. No subsequent modifications are permitted to benefit specific kernels. The second kernel performs a breadth-first search of the graph. Both kernels are timed. </p> <p> There are five problem classes defined by their input size: </p><dl> <dt>toy</dt><dd> 17GB or around 10<sup>10</sup> bytes, which we also call level 10, </dd> <dt>mini</dt><dd> 140GB (10<sup>11</sup> bytes, level 11), </dd> <dt>small</dt><dd> 1TB (10<sup>12</sup> bytes, level 12), </dd> <dt>medium</dt><dd> 17TB (10<sup>13</sup> bytes, level 13), </dd> <dt>large</dt><dd> 140TB (10<sup>14</sup> bytes, level 14), and </dd> <dt>huge</dt><dd> 1.1PB (10<sup>15</sup> bytes, level 15). </dd> </dl> <p>Table <a href="#tbl:classes">classes</a> provides the parameters used by the graph generator specified below. </p> </div> <div id="outline-container-1_1" class="outline-3"> <h3 id="sec-1_1"><span class="section-number-3">1.1</span> References </h3> <div class="outline-text-3" id="text-1_1"> <p> D.A. Bader, J. Feo, J. Gilbert, J. Kepner, D. Koester, E. Loh, K. Madduri, W. Mann, Theresa Meuse, HPCS Scalable Synthetic Compact Applications #2 Graph Analysis (SSCA#2 v2.2 Specification), 5 September 2007. </p> </div> </div> </div> <div id="outline-container-2" class="outline-2"> <h2 id="sec-2"><span class="section-number-2">2</span> Overall benchmark </h2> <div class="outline-text-2" id="text-2"> <p> The benchmark performs the following steps: </p> <ol> <li> Generate the edge list. </li> <li> Construct a graph from the edge list (<b>timed</b>, kernel 1). </li> <li> Randomly sample 64 unique search keys with degree at least one, not counting self-loops. </li> <li> For each search key: <ol> <li> Compute the parent array (<b>timed</b>, kernel 2). </li> <li> Validate that the parent array is a correct BFS search tree for the given search tree. </li> </ol> </li> <li> Compute and output performance information. </li> </ol> <p>Only the sections marked as <b>timed</b> are included in the performance information. Note that all uses of "random" permit pseudorandom number generation. </p> </div> </div> <div id="outline-container-3" class="outline-2"> <h2 id="sec-3"><span class="section-number-2">3</span> Generating the edge list </h2> <div class="outline-text-2" id="text-3"> </div> <div id="outline-container-3_1" class="outline-3"> <h3 id="sec-3_1"><span class="section-number-3">3.1</span> Brief Description </h3> <div class="outline-text-3" id="text-3_1"> <p> The scalable data generator will construct a list of edge tuples containing vertex identifiers. Each edge is undirected with its endpoints given in the tuple as StartVertex and EndVertex. </p> <p> The intent of the first kernel below is to convert a list with no locality into a more optimized form. The generated list of input tuples must not exhibit any locality that can be exploited by the computational kernels. Thus, the vertex numbers must be randomized and a random ordering of tuples must be presented to kernel 1. The data generator may be parallelized, but the vertex names must be globally consistent and care must be taken to minimize effects of data locality at the processor level. </p> </div> </div> <div id="outline-container-3_2" class="outline-3"> <h3 id="sec-3_2"><span class="section-number-3">3.2</span> Detailed Text Description </h3> <div class="outline-text-3" id="text-3_2"> <p> The edge tuples will have the form <StartVertex, EndVertex> where StartVertex is one endpoint vertex label and EndVertex is the other endpoint vertex label. The space of labels is the set of integers beginning with <b>zero</b> up to but not including the number of vertices N (defined below). The kernels are not provided the size N explicitly but must discover it. </p> <p> The input values required to describe the graph are: </p> <dl> <dt>SCALE</dt><dd> The logarithm base two of the number of vertices. </dd> <dt>edgefactor</dt><dd> The ratio of the graph's edge count to its vertex count (i.e., half the average degree of a vertex in the graph). </dd> </dl> <p>These inputs determine the graph's size: </p> <dl> <dt>N</dt><dd> the total number of vertices, 2<sup>SCALE</sup>. An implementation may use any set of N distinct integers to number the vertices, but at least 48 bits must be allocated per vertex number. Other parameters may be assumed to fit within the natural word of the machine. N is derived from the problem’s scaling parameter. </dd> <dt>M</dt><dd> the number of edges. M = edgefactor * N. </dd> </dl> <p>The graph generator is a Kronecker generator similar to the Recursive MATrix (R-MAT) scale-free graph generation algorithm [Chakrabarti, et al., 2004]. For ease of discussion, the description of this R-MAT generator uses an adjacency matrix data structure; however, implementations may use any alternate approach that outputs the equivalent list of edge tuples. This model recursively sub-divides the adjacency matrix of the graph into four equal-sized partitions and distributes edges within these partitions with unequal probabilities. Initially, the adjacency matrix is empty, and edges are added one at a time. Each edge chooses one of the four partitions with probabilities A, B, C, and D, respectively. These probabilities, the initiator parameters, are provided in Table <a href="#tbl:initiator">initiator</a>. </p> <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <a name="tbl:initiator" id="tbl:initiator"></a> <caption>Initiator parameters for the Kronecker graph generator</caption> <colgroup><col align="left" /><col align="left" /> </colgroup> <tbody> <tr><td>A = 0.57</td><td>B = 0.19</td></tr> <tr><td>C = 0.19</td><td>D = 1-(A+B+C) = 0.05</td></tr> </tbody> </table> <p> The next section details a high-level implementation for this generator. High-performance, parallel implementations are included in the reference implementation. </p> <p> The graph generator creates a small number of multiple edges between two vertices as well as self-loops. Multiple edges, self-loops, and isolated vertices may be ignored in the subsequent kernels but must be included in the edge list provided to the first kernel. The algorithm also generates the data tuples with high degrees of locality. Thus, as a final step, vertex numbers must be randomly permuted, and then the edge tuples randomly shuffled. </p> <p> It is permissible to run the data generator in parallel. In this case, it is necessary to ensure that the vertices are named globally, and that the generated data does not possess any locality, either in local memory or globally across processors. </p> <p> The scalable data generator should be run before starting kernel 1, storing its results to either RAM or disk. If stored to disk, the data may be retrieved before starting kernel 1. The data generator and retrieval operations need not be timed. </p> </div> </div> <div id="outline-container-3_3" class="outline-3"> <h3 id="sec-3_3"><span class="section-number-3">3.3</span> Sample high-level implementation of the Kronecker generator </h3> <div class="outline-text-3" id="text-3_3"> <p> The GNU Octave routine in Algorithm <a href="#alg:generator">generator</a> is an attractive implementation in that it is embarrassingly parallel and does not require the explicit formation of the adjacency matrix. </p> <pre class="src src-Octave">function ij = kronecker_generator (SCALE, edgefactor) %% Generate an edgelist according to the Graph500 %% parameters. In this sample, the edge list is %% returned in an array with two rows, where StartVertex %% is first row and EndVertex is the second. The vertex %% labels start at zero. %% %% Example, creating a sparse matrix for viewing: %% ij = kronecker_generator (10, 16); %% G = sparse (ij(1,:)+1, ij(2,:)+1, ones (1, size (ij, 2))); %% spy (G); %% The spy plot should appear fairly dense. Any locality %% is removed by the final permutations. %% Set number of vertices. N = 2^SCALE; %% Set number of edges. M = edgefactor * N; %% Set initiator probabilities. [A, B, C] = deal (0.57, 0.19, 0.19); %% Create index arrays. ij = ones (2, M); %% Loop over each order of bit. ab = A + B; c_norm = C/(1 - (A + B)); a_norm = A/(A + B); for ib = 1:SCALE, %% Compare with probabilities and set bits of indices. ii_bit = rand (1, M) > ab; jj_bit = rand (1, M) > ( c_norm * ii_bit + a_norm * not (ii_bit) ); ij = ij + 2^(ib-1) * [ii_bit; jj_bit]; end %% Permute vertex labels p = randperm (N); ij = p(ij); %% Permute the edge list p = randperm (M); ij = ij(:, p); %% Adjust to zero-based labels. ij = ij - 1; </pre> </div> </div> <div id="outline-container-3_4" class="outline-3">