Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
5bdfcdb
Four benchmarks
wukefe Jun 1, 2015
8ef946b
Update four benchmarks
wukefe Jun 2, 2015
e4f3957
Revert C code for lud
wukefe Jun 3, 2015
bf1442e
Get page-rank done
wukefe Jun 5, 2015
7a48f52
Increase two matlab benchmarks
wukefe Jun 6, 2015
f2887b7
nw benchmark
wukefe Jun 6, 2015
e4a1868
change matlab.md file
wukefe Jun 6, 2015
081ff1c
9th benchmark: crc
wukefe Jun 8, 2015
0cc6f2f
Test with lud benchmark
wukefe Jun 8, 2015
3bcadbc
Modified lud benchmark to be compilable by matjuice
gnuvince Jun 8, 2015
3b3d464
Outputs match in random number gen. Outputs are unsigned ints now.
valerie-sd Jun 2, 2015
13bfee2
Added basic matlab support for back-propagation benchmark
elavoie Jun 3, 2015
4759a8f
Ensured correctness of LUD and consistency with C version
elavoie Jun 9, 2015
2f414bd
Compile folder for compiler tests
wukefe Jun 9, 2015
2db5603
Update matlab.md
wukefe Jun 9, 2015
26599ce
Fix matlab.md
wukefe Jun 9, 2015
a395f66
Fix matlab.md (2)
wukefe Jun 9, 2015
f6d7691
Merge
gnuvince Jun 9, 2015
371a8c8
Added support for MATLAB on Mathworks VM to the dwarf runner script
elavoie Jun 9, 2015
31530a7
Added support for FFT, self-checking step still missing
elavoie Jun 10, 2015
cdae9f5
add newlines to end of some files
gnuvince Jun 10, 2015
2c41d42
Merge branch 'matlab-version' of github.com:Sable/Ostrich into matlab…
gnuvince Jun 10, 2015
3587f7e
First steps in automating matjuice for dwarf runner
gnuvince Jun 11, 2015
0ceb3a9
Added Matlab benchmarks that call into standard library functions rat…
elavoie Jun 10, 2015
36d304d
Added caching of data generation for LUD and FFT to speed up running …
elavoie Jun 11, 2015
e05b830
Added Matjuice version to LUD benchmark
elavoie Jun 12, 2015
1b7f04d
Added support for no bounds checking in the dwarf runner script for L…
elavoie Jun 12, 2015
df59841
Added preliminary support in dwarf runner for FFT but the interproced…
elavoie Jun 12, 2015
d08f9b4
Fixed bug for matjuice option in dwarf-runner
elavoie Jun 12, 2015
a2fb17b
Build Makefile for matlab and matjuice
wukefe Jun 12, 2015
58bf75f
Merge remote-tracking branch 'origin/matlab-version' into matlab-version
wukefe Jun 12, 2015
53092ed
Add bfs
gnuvince Jun 12, 2015
edc07d6
Merge branch 'matlab-version' of github.com:Sable/Ostrich into matlab…
gnuvince Jun 12, 2015
198783d
Removed spurious pagerank files
elavoie Jun 12, 2015
c90af6d
Refactored LUD makefile to abstract common targets for Matlab and Mat…
elavoie Jun 12, 2015
9181bdf
Final fixes for makefile for matjuice
elavoie Jun 13, 2015
a591fe0
Fixed bug in matlab makefile
elavoie Jun 13, 2015
6863792
bfs works in matjuice
gnuvince Jun 13, 2015
34c3df8
merge
gnuvince Jun 13, 2015
4b67dd6
nqueens benchmark
wukefe Jun 13, 2015
8d9dff6
Completed the 12th benchmark, Lavamd .
wukefe Jun 13, 2015
a1c3082
Made LUD cache input data in a csv file instead
elavoie Jun 14, 2015
874f90e
Changed route for web server to use the clearer 'result' route rather…
elavoie Jun 14, 2015
4e9d85e
Updated Pagerank to add verified correct Matlab support
elavoie Jun 14, 2015
9d124c4
Fixed FFT makefile to follow new conventions and fixed typo in LUD in…
elavoie Jun 15, 2015
c6f5083
Added unsupported error reporting for Matjuice version of PageRank
elavoie Jun 15, 2015
8e350a0
Changed how matlab results are output on the standard output to make …
elavoie Jun 15, 2015
2902249
Added Matlab size primitive support to the standard library of matjuice
elavoie Jun 15, 2015
443dd47
Refactored BFS to add verification and split the core computation fro…
elavoie Jun 15, 2015
c883aa5
add matjuice files for nw
gnuvince Jun 15, 2015
96a3161
Fixed fft benchmark (initialize your arrays people)
gnuvince Jul 14, 2015
05bc880
Merge conflict resolution
elavoie Nov 8, 2015
9c6efa0
Moved lud to src folder
elavoie Nov 8, 2015
b04e7c0
Update README.md
elavoie Nov 16, 2015
173e404
Refactored directory structure and WIP on json configuration files sc…
elavoie Nov 22, 2015
a895c58
Merge branch 'matlab-version' of github.com:Sable/Ostrich into matlab…
elavoie Nov 22, 2015
762ea1f
fixed typos
elavoie Nov 22, 2015
741a4c0
Fixed typos
elavoie Nov 22, 2015
cf4e440
Preliminary working version of lud c gcc version, with build and run …
elavoie Dec 17, 2015
026a801
Now saves run outputs to the runs folder
elavoie Dec 21, 2015
98d60f5
Refactored output for runs to facilitate the merging of multiple run …
elavoie Dec 29, 2015
8204a17
Made short-name pattern more permissive to allow using ISO datetime f…
elavoie Dec 31, 2015
f8512f8
Added basic reporting functionalities
elavoie Dec 31, 2015
d9f2493
Added python plot script from Ostrich DLS 2014 paper to utilities
elavoie Jan 4, 2016
b792d18
Added data generation script for LUD
elavoie Jan 5, 2016
bf169eb
Added dwarf category to lud benchmark.json file
elavoie Jan 5, 2016
f6e234c
LUD: Updated data generation utility and changed C runner to read and…
elavoie Jan 6, 2016
b22c85a
LUD Matlab: Modified runner script to get input from file system and …
elavoie Jan 7, 2016
75499b7
Added support for matlab execution environment from the commandline w…
elavoie Jan 8, 2016
f058ed4
Modified matlab environment run script to automatically add the scrip…
elavoie Jan 8, 2016
747674d
LUD: Added matlab implementation
elavoie Jan 9, 2016
c335a06
Added native environment, cat compiler, proper filter for valid build…
elavoie Jan 9, 2016
16558e3
Native environment: made unknown arguments pass-through
elavoie Jan 11, 2016
ec5a0bb
Finished minimal support for running matlab benchmarks in addition to…
elavoie Jan 11, 2016
f26e069
LUD: Added script to generate input file on demand
elavoie Jan 11, 2016
7a1e1e9
Fixed bugs
elavoie Jan 11, 2016
74f9ab1
LUD: Added check functionality
elavoie Jan 12, 2016
3e637a9
Added verification of output of runs
elavoie Jan 12, 2016
e17c807
Added environment support for google chrome
elavoie Jan 13, 2016
c1068ea
Factored common part for all browsers environment into a separate uti…
elavoie Jan 13, 2016
219411e
chrome: Added environment.json file
elavoie Jan 13, 2016
d9f3088
Added proper type conversion of input arguments to browser-run
elavoie Jan 13, 2016
474942b
Added support for Chrome, Safari and Firefox on OS X
elavoie Jan 13, 2016
2e262b2
LUD: Added support for JS implementation
elavoie Jan 15, 2016
e1e5574
lud js: removed unused files
elavoie Jan 15, 2016
2cd13c5
lud matlab: cleaned up unused files
elavoie Jan 15, 2016
af91b0b
Added auto-closing of tabs in browsers when running benchmarks
elavoie Jan 15, 2016
ed6c321
lud: Removed unused implementation versions beside c, js, and matlab.…
elavoie Jan 18, 2016
d64cee1
Update README.md
elavoie Jan 18, 2016
7913d61
Refactored benchmark configuration to also support output values in a…
elavoie Jan 19, 2016
25033e6
nqueens: added c implementation and validation of output through stan…
elavoie Jan 19, 2016
86e5553
Fixed bugs
elavoie Jan 19, 2016
6719347
Added platform configuration file
elavoie Jan 20, 2016
788f4ce
Added files to gitignore
elavoie Jan 20, 2016
fad0f61
Added libraries to implementation.json required properties because th…
elavoie Jan 20, 2016
8448d45
nqueens: added js implementation
elavoie Jan 20, 2016
d5ae504
nqueens js: removed unused code
elavoie Jan 20, 2016
6ae2e9d
nqueens: added matlab implementation
elavoie Jan 20, 2016
cd91482
Renamed the matlab environment to matlab-vm to make it unambiguous
elavoie Jan 21, 2016
d3569fa
Added positional arguments to the run utility to handle any combinati…
elavoie Jan 21, 2016
ef4a20c
nqueens matlab: Added newline at the end of each matlab source file t…
elavoie Jan 21, 2016
c4434b1
Create README.md
elavoie Jan 30, 2016
fb92d61
Update README.md
elavoie Jan 30, 2016
46f2086
Create README.md
elavoie Jan 30, 2016
cee24b4
Added Readme file to the .wu hidden directory to describe what it is …
elavoie Jan 31, 2016
e6a3c18
Removed 'dependencies' property from implementation description files…
elavoie Feb 3, 2016
e8f381c
gcc: made some properties optional and warning as errors for building…
elavoie Feb 3, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ rodinia_2.4/
build/
*.pyc
dls14empiricalJS/
builds/
runs/
node_modules/
*.csv
*.sublime*
1 change: 1 addition & 0 deletions .wu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a hidden directory to maintain configuration information specific to a particular installation of the Ostrich Benchmark Suite, following the Wu Wei Benchmarking Toolking standards (https://github.com/Sable/wu-wei-benchmarking-toolkit).
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ We aim to make the suite:
6. **Fast** by making the setup (data generation and loading) and teardown as quick as possible so that most of the time is spent in the core computation in every language;
7. **Small** by minimizing the amount of data needed to download the suite;
8. **Simple** by minimizing the amount of external dependencies and tools required to run the suite;

Dependencies
------------------------
Although we tried our best to minimize external dependencies, the suite still depends on the following external tools:
1. Node.js
2. Python/Numpy/Scipy



Getting Started
------------------------
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/lud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Dependencies:

Python/Numpy/Scipy (Suggested: [Enthought Canopy](https://store.enthought.com/downloads/))
24 changes: 24 additions & 0 deletions benchmarks/lud/benchmark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"type": "benchmark",
"name":"Lower-Upper Decomposition",
"short-name":"lud",
"description":"In numerical analysis, LU decomposition (where 'LU' stands for 'Lower Upper', and also called LU factorization) factors a matrix as the product of a lower triangular matrix and an upper triangular matrix. The product sometimes includes a permutation matrix as well. The LU decomposition can be viewed as the matrix form of Gaussian elimination. Computers usually solve square systems of linear equations using the LU decomposition, and it is also a key step when inverting a matrix, or computing the determinant of a matrix.",
"version":"0.1.0",
"input-size":{
"small":8,
"medium":1024,
"large":2048
},
"input-format": "csv",
"random-seed":1337,
"dwarf": "dense linear algebra",
"output": {
"type": "output-file",
"output-file": { "file": "./output/output.csv" },
"output-check-arguments": [
{ "expand": "/experiment/input-size" },
{ "config": "/benchmark/random-seed" },
{ "config": "/experiment/output-file" }
]
}
}
42 changes: 42 additions & 0 deletions benchmarks/lud/implementations/c/implementation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"type": "implementation",
"short-name":"c",
"description":"Reference C implementation ported from Rodinia suite",
"language":"c",
"core-source-files":[
{ "file": "./lud_base.c"}
],
"runner-source-file": { "file": "./runner.c" },
"runner-arguments": [
{
"prefix":"-s ",
"value": { "expand": "/experiment/input-size" }
},
{
"prefix":"-i ",
"value": { "expand": "/experiment/input-file"}
}
],
"runner-arguments-with-output-check": [
{
"prefix":"-s ",
"value": { "expand": "/experiment/input-size" }
},
{
"prefix":"-i ",
"value": { "expand": "/experiment/input-file" }
},
{
"prefix":"-o ",
"value": { "config": "/experiment/output-file" }
}
],
"libraries":[
{ "suite-root": "/implementations/c/common_rand.c"},
{ "file": "./misc/common.c"}
],
"include-directories":[
{"suite-root": "/implementations/c/"},
{ "file": "./misc/"}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include "common.h"
#include "common_rand.h"

#ifndef DEBUG
#define DEBUG 0
#endif

void stopwatch_start(stopwatch *sw){
if (sw == NULL)
return;
Expand Down Expand Up @@ -38,6 +42,9 @@ get_interval_by_usec(stopwatch *sw){
return ((sw->end.tv_sec-sw->begin.tv_sec)*1000000+(sw->end.tv_usec-sw->begin.tv_usec));
}

// This function creates a matrix that is guaranteed to have a
// LUD solution by creating the upper and lower trangular matrices
// and then multiplying them together.
func_ret_t
create_matrix_from_random(double **mp, int size){
double *l, *u, *m;
Expand Down Expand Up @@ -86,6 +93,28 @@ create_matrix_from_random(double **mp, int size){
}
}

// For debugging purposes, change to '1' to print
// intermediary matrices
if (DEBUG) {
fprintf(stderr,"l:\n");
for (i=0; i < size; i++) {
for (j=0; j < size; j++) {
fprintf(stderr, "%f ", l[i*size+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, "\n");

fprintf(stderr,"u:\n");
for (i=0; i < size; i++) {
for (j=0; j < size; j++) {
fprintf(stderr, "%f ", u[i*size+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, "\n");
}

for (i=0; i < size; i++) {
for (j=0; j < size; j++) {
sum = 0;
Expand Down Expand Up @@ -190,29 +219,32 @@ lud_verify(double *m, double *lu, int matrix_dim){
}
tmp[i*matrix_dim+j] = sum;
}
/*
fprintf(stderr, ">>>>>LU<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", lu[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, ">>>>>result<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", tmp[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, ">>>>>input<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", m[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
*/

// Just for debugging purposes
// Set to '1' to execute
if (DEBUG) {
fprintf(stderr, ">>>>>LU<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", lu[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, ">>>>>result<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", tmp[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
fprintf(stderr, ">>>>>input<<<<<<<\n");
for (i=0; i<matrix_dim; i++){
for (j=0; j<matrix_dim;j++){
fprintf(stderr, "%f ", m[i*matrix_dim+j]);
}
fprintf(stderr, "\n");
}
}

int good = 1;
for (i=0; i<matrix_dim; i++){
Expand All @@ -223,9 +255,14 @@ lud_verify(double *m, double *lu, int matrix_dim){
}
}
}
if(good) fprintf(stderr, "Good LUD!");
else fprintf(stderr, "Bad LUD!");
free(tmp);
if(good) {
fprintf(stderr, "Good LUD!\n");
return RET_SUCCESS;
} else {
fprintf(stderr, "Bad LUD!\n");
return RET_FAILURE;
}
}

void
Expand Down
165 changes: 165 additions & 0 deletions benchmarks/lud/implementations/c/runner.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
* =====================================================================================
*
* Filename: runner.c
*
* Description: The main wrapper for the suite
*
* Version: 1.0
* Created: 10/22/2009 08:40:34 PM
* Revision: none
* Compiler: gcc
*
* Author: Liang Wang (lw2aw), lw2aw@virginia.edu
* Company: CS@UVa
*
* =====================================================================================
*/

#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "common.h"
#include "common_rand.h"

static int do_verify = 0;

static struct option long_options[] = {
/* name, has_arg, flag, val */
{"input", 1, NULL, 'i'},
{"size", 1, NULL, 's'},
{"verify", 0, NULL, 'v'},
{0,0,0,0}
};

extern void
lud_base(double *m, int matrix_dim);

int
main ( int argc, char *argv[] )
{
int matrix_dim = 32; /* default matrix_dim */
int opt, option_index=0, error=0;
func_ret_t ret;
char *input_path = NULL;
char *output_path = NULL;
FILE *file;
double *m;
stopwatch sw;
int i,j;
int debug = 0;
size_t linesiz=0;
char* linebuf=NULL;
ssize_t linelen=0;
char* token;
const char comma[2] = ",";

while ((opt = getopt_long(argc, argv, ":dvs:i:o:",
long_options, &option_index)) != -1 ) {
switch(opt){
case 'v':
do_verify = 1;
break;
case 's':
matrix_dim = atoi(optarg);
break;
case 'i':
input_path = optarg;
break;
case 'o':
output_path = optarg;
break;
case '?':
fprintf(stderr, "invalid option\n");
error=1;
break;
case 'd':
debug=1;
break;
case ':':
fprintf(stderr, "missing argument\n");
error=1;
break;
default:
error=1;
}
}

if ((optind < argc) || (optind == 1) || input_path == NULL || error) {
fprintf(stderr, "Usage: %s -s size -i input_path [-v] [-d] [-o output_path]\n", argv[0]);
exit(EXIT_FAILURE);
}

file = fopen(input_path, "r");
if (file == NULL) {
fprintf(stderr, "Invalid input file path: %s\n", input_path);
exit(EXIT_FAILURE);
}

// Read matrix from file
if (debug) {
fprintf(stderr, "Reading data from file %s\n", input_path);
}
m = (double *)malloc(sizeof(double) * matrix_dim * matrix_dim);
j = 0;
while ((linelen=getline(&linebuf, &linesiz, file)) != -1) {
if (debug) {
fprintf(stderr, "Read line: %s\n", linebuf);
}
/* get the first number */
i = 0;
token = strtok(linebuf, comma);

/* walk through other numbers */
while( token != NULL ) {
if (debug) {
fprintf(stderr, "Read token: %s\n", token);
}
m[j*matrix_dim + i] = atof(token);
token = strtok(NULL, comma);
i = i + 1;
}

free(linebuf);
linebuf=NULL;
j = j + 1;
}
fclose(file);

if (debug) {
fprintf(stderr, "Computing LUD\n");
}
stopwatch_start(&sw);
lud_base(m, matrix_dim);
stopwatch_stop(&sw);

if (output_path) {
if (debug) {
fprintf(stderr, "Saving result in %s\n", output_path);
}
file = fopen(output_path, "w");

if (file == NULL) {
free(m);
exit(EXIT_FAILURE);
}

for (j = 0; j < matrix_dim; ++j) {
for (i = 0; i < matrix_dim; ++i) {
fprintf(file, "%.*f", 21, m[j*matrix_dim+i]);
if (i < matrix_dim-1) {
fprintf(file, ",");
}
}
fprintf(file, "\n");
}
fclose(file);
}

free(m);
printf("{ \"status\": %d, \"options\": \"-s %d\", \"time\": %f }\n", 1, matrix_dim, get_interval_by_sec(&sw));
return EXIT_SUCCESS;
} /* ---------- end of function main ---------- */
Loading