From: adash Date: Fri, 8 May 2009 01:27:04 +0000 (+0000) Subject: Add new benchmark:....some prelimnary files X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fb453751481e65a109bb32f04a734d2c8f946f9f;p=IRC.git Add new benchmark:....some prelimnary files --- diff --git a/Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java b/Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java new file mode 100644 index 00000000..a706bdec --- /dev/null +++ b/Robust/src/Benchmarks/SingleTM/SSCA2/Edge.java @@ -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 index 00000000..dbeb826c --- /dev/null +++ b/Robust/src/Benchmarks/SingleTM/SSCA2/GetUserParameters.java @@ -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 Probability [i]nter-clique (%f)\n", PROB_INTERCL_EDGES); + System.out.println(" k [k]ind: 0=array 1=list 2=vector (%li)\n", K3_DS); + System.out.println(" l Max path [l]ength (%li)\n", SUBGR_EDGE_LENGTH); + System.out.println(" p Max [p]arallel edges (%li)\n", MAX_PARAL_EDGES); + System.out.println(" s Problem [s]cale (%li)\n", SCALE); + System.out.println(" t Number of [t]hreads (%li)\n", THREADS); + System.out.println(" u Probability [u]nidirectional (%f)\n", PROB_UNIDIRECTIONAL); + System.out.println(" w 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< + +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 \ + -k \ + -l \ + -p \ + -s \ + -t \ + -u \ + -w + +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 index 00000000..c47a3352 --- /dev/null +++ b/Robust/src/Benchmarks/SingleTM/SSCA2/VList.java @@ -0,0 +1,10 @@ +/* Vertex list returned by Kernel 3 */ +public class VList { + public long num; + public long depth; + + public VList() { + + } + +}