Add new benchmark:....some prelimnary files
authoradash <adash>
Fri, 8 May 2009 01:27:04 +0000 (01:27 +0000)
committeradash <adash>
Fri, 8 May 2009 01:27:04 +0000 (01:27 +0000)
Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/GetUserParameters.java [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/Globals.java [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/Graph.java [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/GraphSDG.java [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/README [new file with mode: 0644]
Robust/src/Benchmarks/SingleTM/SSCA2/VList.java [new file with mode: 0644]

diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java b/Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java
new file mode 100644 (file)
index 0000000..a706bde
--- /dev/null
@@ -0,0 +1,8 @@
+public class Edge {
+  public long startVertex;
+  public long endVertex;
+  public long edgeNum;
+
+  public Edge() {
+  }
+}
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/GetUserParameters.java b/Robust/src/Benchmarks/SingleTM/SSCA2/GetUserParameters.java
new file mode 100644 (file)
index 0000000..dbeb826
--- /dev/null
@@ -0,0 +1,209 @@
+/* =============================================================================
+ *
+ * getUserParameters.java
+ *
+ * =============================================================================
+ * 
+ * For the license of ssca2, please see ssca2/COPYRIGHT
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * Unless otherwise noted, the following license applies to STAMP files:
+ * 
+ * Copyright (c) 2007, Stanford University
+ * All rights reserved.
+ *
+ * Port to Java version
+ * Alokika Dash
+ * University of California, Irvine
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ * 
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ * 
+ *     * Neither the name of Stanford University nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY STANFORD UNIVERSITY ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * =============================================================================
+ */
+public class GetUserParameters {
+
+  Globals glb;
+
+  public GetUserParameters(Globals glb) {
+    this.glb = glb;
+
+    /*
+     * Scalable Data Generator parameters - defaults
+     */
+    glb.THREADS             = 1;
+    glb.SCALE               = 20;              /* binary scaling heuristic */
+    glb.MAX_PARAL_EDGES     = 3;               /* between vertices. */
+    glb.PERC_INT_WEIGHTS    = 0.6;             /* % int (vs. string) edge weights */
+    glb.PROB_UNIDIRECTIONAL = 0.1;
+    glb.PROB_INTERCL_EDGES  = 0.5;             /* Init probability link between cliques */
+
+    glb.SUBGR_EDGE_LENGTH   = 3;               /* Kernel 3: max. path length,       */
+                                               /* measured by num edges in subgraph */
+                                               /* generated from the end Vertex of  */
+                                               /* SI and SC lists                   */
+    /*
+     * Some implementation-specific vars, nothing to do with the specs
+     */
+
+    glb.K3_DS               = 2;               /* 0 - Array         */
+                                               /* 1 - Linked List   */
+                                               /* 2 - Dynamic Array */
+
+  }
+  /* =============================================================================
+   * displayUsage
+   * =============================================================================
+   */
+  static void
+    displayUsage ()
+    {
+      System.out.println("Usage: SSCA [options]\n");
+      puts("\nOptions:                                       (defaults)\n");
+      System.out.println("    i <double>    Probability [i]nter-clique      (%f)\n",  PROB_INTERCL_EDGES);
+      System.out.println("    k <int>   [k]ind: 0=array 1=list 2=vector (%li)\n", K3_DS);
+      System.out.println("    l <int>   Max path [l]ength               (%li)\n", SUBGR_EDGE_LENGTH);
+      System.out.println("    p <int>   Max [p]arallel edges            (%li)\n", MAX_PARAL_EDGES);
+      System.out.println("    s <int>   Problem [s]cale                 (%li)\n", SCALE);
+      System.out.println("    t <int>   Number of [t]hreads             (%li)\n", THREADS);
+      System.out.println("    u <double>    Probability [u]nidirectional    (%f)\n",  PROB_UNIDIRECTIONAL);
+      System.out.println("    w <double>    Fraction integer [w]eights      (%f)\n",  PERC_INT_WEIGHTS);
+      System.exit(-1);
+    }
+
+
+  /* =============================================================================
+   * parseArgs
+   * =============================================================================
+   */
+  public static void
+    parseArgs(String[] args)
+    {
+      int i = 0;
+      String arg;
+      while(i < args.length && args[i].startsWith("-")) {
+        arg = args[i++];
+        //check options
+        if(arg.equals("-i")) {
+          if(i < args.length) {
+            glb.PROB_INTERCL_EDGES = new Integer(args[i++]).doubleValue();
+          }
+        } else if(arg.equals("-k")) {
+          if(i < args.length) {
+            glb.K3_DS = new Integer(args[i++]).intValue();
+          }
+          if(!(glb.K3_DS >=0 && K3_DS <=2))
+            System.out.println("Input a valid number for -k option between >=0 and <= 2");
+        } else if(arg.equals("-l")) {
+          if(i < args.length) {
+            glb.SUBGR_EDGE_LENGTH = new Integer(args[i++]).intValue();
+          }
+        } else if(arg.equals("-p")) {
+          if(i < args.length) {
+            glb.MAX_PARAL_EDGES = new Integer(args[i++]).intValue();
+          }
+        } else if(arg.equals("-s")) {
+          if(i < args.length) {
+            glb.SCALE = new Integer(args[i++]).intValue();
+          }
+        } else if(arg.equals("-t")) {
+          if(i < args.length) {
+            glb.THREADS = new Integer(args[i++]).intValue();
+          }
+        } else if(arg.equals("-u")) {
+          if(i < args.length) {
+            glb.PROB_UNIDIRECTIONAL = new Integer(args[i++]).doubleValue();
+          }
+        } else if(arg.equals("-w")) {
+          if(i < args.length) {
+            glb.PERC_INT_WEIGHTS = new Integer(args[i++]).doubleValue();
+          }
+        } else if(arg.equals("-h")) {
+          displayUsage();
+        }
+      }
+
+      if(glb.THREADS == 0)
+        displayUsage();
+    }
+
+  /* =============================================================================
+   * getUserParameters
+   * =============================================================================
+   */
+  static void
+    getUserParameters (String[] argv)
+    {
+      /*
+       * Scalable Data Generator parameters - defaults
+       */
+
+      glb.THREADS             = 1;
+      glb.SCALE               = 20;              /* binary scaling heuristic */
+      glb.MAX_PARAL_EDGES     = 3;               /* between vertices. */
+      glb.PERC_INT_WEIGHTS    = 0.6;             /* % int (vs. string) edge weights */
+      glb.PROB_UNIDIRECTIONAL = 0.1;
+      glb.PROB_INTERCL_EDGES  = 0.5;             /* Init probability link between cliques */
+
+      glb.SUBGR_EDGE_LENGTH   = 3;               /* Kernel 3: max. path length,       */
+      /* measured by num edges in subgraph */
+      /* generated from the end Vertex of  */
+      /* SI and SC lists                   */
+
+      /*
+       * Some implementation-specific vars, nothing to do with the specs
+       */
+
+      glb.K3_DS               = 2;               /* 0 - Array         */
+      /* 1 - Linked List   */
+      /* 2 - Dynamic Array */
+
+      parseArgs(argv); /* overrides default values set above */
+
+
+      glb.TOT_VERTICES        = (1<<glb.SCALE);
+      glb.MAX_CLIQUE_SIZE     = (1<<(glb.SCALE/3));
+      glb.MAX_INT_WEIGHT      = (1<<glb.SCALE);      /* Max int value in edge weight */
+      glb.MAX_STRLEN          = glb.SCALE;
+
+      glb.SOUGHT_STRING       = "";              /* Kernel 2: Character string sought:  */
+      /* specify here, else it is picked     */
+      /* picked from randomly selected entry */
+      /* in genScalData.c                    */
+
+      glb.MAX_CLUSTER_SIZE    = glb.MAX_CLIQUE_SIZE; /* Kernel 4: Clustering search box size */
+    }
+}
+/* =============================================================================
+ *
+ * End of getUserParameters.java
+ *
+ * =============================================================================
+ */
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/Globals.java b/Robust/src/Benchmarks/SingleTM/SSCA2/Globals.java
new file mode 100644 (file)
index 0000000..1be81d5
--- /dev/null
@@ -0,0 +1,94 @@
+/* =============================================================================
+ *
+ * globals.java
+ *
+ * =============================================================================
+ *
+ * For the license of bayes/sort.h and bayes/sort.c, please see the header
+ * of the files.
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * For the license of kmeans, please see kmeans/LICENSE.kmeans
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * For the license of ssca2, please see ssca2/COPYRIGHT
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * For the license of lib/mt19937ar.c and lib/mt19937ar.h, please see the
+ * header of the files.
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * For the license of lib/rbtree.h and lib/rbtree.c, please see
+ * lib/LEGALNOTICE.rbtree and lib/LICENSE.rbtree
+ * 
+ * ------------------------------------------------------------------------
+ * 
+ * Unless otherwise noted, the following license applies to STAMP files:
+ * 
+ * Copyright (c) 2007, Stanford University
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ * 
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ * 
+ *     * Neither the name of Stanford University nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY STANFORD UNIVERSITY ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * =============================================================================
+ */
+
+public class Globals {
+
+  public Globals() {
+
+  }
+
+  public int SCALE;
+  public int TOT_VERTICES;
+  public int MAX_CLIQUE_SIZE;
+  public int MAX_PARAL_EDGES;
+  public int MAX_INT_WEIGHT;
+  public int SOUGHT_STRING;
+  public int MAX_STRLEN;
+  public double PERC_INT_WEIGHTS;
+  public double PROB_UNIDIRECTIONAL;
+  public double PROB_INTERCL_EDGES;
+  public int SUBGR_EDGE_LENGTH;
+  public int MAX_CLUSTER_SIZE;
+  public int MAX_STRLEN;
+  public int K3_DS;
+  public int THREADS;
+}
+
+/* =============================================================================
+ *
+ * End of globals.java
+ *
+ * =============================================================================
+ */
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/Graph.java b/Robust/src/Benchmarks/SingleTM/SSCA2/Graph.java
new file mode 100644 (file)
index 0000000..5e76aae
--- /dev/null
@@ -0,0 +1,27 @@
+/*the graph data structure*/
+public class Graph {
+  public long numVertices;
+  public long numEdges;
+
+  public long numDirectedEdges;
+  public long numUndirectedEdges;
+
+  public long numIntEdges;
+  public long numStrEdges;
+
+  public long outDegree;
+  public long outVertexIndex;
+  public long outVertexList;
+  public long paralEdgeIndex;
+
+  public long inDegree;
+  public long inVertexIndex;
+  public long inVertexList;
+
+  public long intWeight;
+  public char[] strWeight;
+
+  public Graph() {
+
+  }
+}
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/GraphSDG.java b/Robust/src/Benchmarks/SingleTM/SSCA2/GraphSDG.java
new file mode 100644 (file)
index 0000000..006df2c
--- /dev/null
@@ -0,0 +1,16 @@
+public class GraphSDG {
+  public long[] startVertex;
+  public long[] endVertex;
+  public long[] intWeight;
+
+  /* The idea is to store the index of the string weights (as a negative value)
+   * in the long Weight array. A negative value because we need to sort on
+   * the intWeights in Kernel 2. Hence the long long
+   */
+  public char[] strWeight;
+  public long numEdgesPlaced;
+
+  public GraphSDG() {
+
+  }
+}
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/README b/Robust/src/Benchmarks/SingleTM/SSCA2/README
new file mode 100644 (file)
index 0000000..0ef14b9
--- /dev/null
@@ -0,0 +1,65 @@
+Introduction
+------------
+
+The Scalable Synthetic Compact Applications~2 (SSCA2)
+benchmark [1] is comprised of four kernels that operate
+on a large, directed, weighted multi-graph. These four graph kernels are
+commonly used in applications ranging from computational biology to security.
+STAMP focuses on Kernel 1, which constructs an efficient graph data
+structure using adjacency arrays and auxiliary arrays.
+
+The transactional version of SSCA2 has threads adding nodes to the graph in
+parallel and uses transactions to protect accesses to the adjacency arrays. Since this operation is relatively small, not
+much time is spent in transactions. Additionally, the length of the transactions
+and the sizes of their read and write sets is relatively small. The amount of
+contention is the application is also relatively low as the large number of
+graph nodes lead to infrequent concurrent updates of the same adjacency list.
+
+When using this benchmark, please cite [2].
+
+The code for ssca2 is Copyright (C) 1997-2005  David A. Bader.
+
+
+Compiling and Running
+---------------------
+
+To build the application, simply run:
+
+    make -f <makefile>
+
+in the source directory. For example, for the sequential flavor, run:
+
+    make -f Makefile.seq
+
+By default, this produces an executable named "yada", which can then be
+run in the following manner:
+
+    ./ssca2 -i <probability_of_inter_clique> \
+            -k <data_structure_kind> \
+            -l <max_path_length> \
+            -p <max_number_of_parallel_edges> \
+            -s <problem_scale> \
+            -t <number_of_threads> \
+            -u <probability_unidirectional> \
+            -w <fraction_with_integer_weights>
+
+The following arguments are recommended for simulated runs:
+
+    -s13 -i1.0 -u1.0 -l3 -p3
+
+For non-simulator runs, a larger input can be used:
+
+    -s20 -i1.0 -u1.0 -l3 -p3
+
+
+References
+----------
+
+[1] D. A. Bader and K. Madduri. Design and implementation of the hpcs graph
+    analysis benchmark on symmetric multiprocessors. In HiPC Õ05: 12th
+    International Conference on High Performance Computing, December 2005. 
+
+[2] C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford 
+    Transactional Applications for Multi-processing. In IISWC '08: Proceedings
+    of The IEEE International Symposium on Workload Characterization,
+    September 2008. 
diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/VList.java b/Robust/src/Benchmarks/SingleTM/SSCA2/VList.java
new file mode 100644 (file)
index 0000000..c47a335
--- /dev/null
@@ -0,0 +1,10 @@
+/* Vertex list returned by Kernel 3 */
+public class VList {
+  public long num;
+  public long depth;
+
+  public VList() {
+
+  }
+
+}