Skip to content

Commit

Permalink
updated the fuse paper suite
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Jul 12, 2016
1 parent 90f46d3 commit cbc3aa7
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 5 deletions.
4 changes: 2 additions & 2 deletions benchmarks/leibnitz_pi/c99_seq/src/leibnitz_pi.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ double leibnitz_pi(int nelements)

int main(int argc, char* argv[])
{
bp_util_type bp = bp_util_create(argc, argv, 2);// Grab arguments
bp_util_type bp = bp_util_create(argc, argv, 1);// Grab arguments
if (bp.args.has_error) {
return 1;
}
const int nelements = bp.args.sizes[0] * bp.args.sizes[1];
const int nelements = bp.args.sizes[0];

bp.timer_start(); // Start timer
double pi = 4.0*leibnitz_pi(nelements); // Run benchmark
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ double leibnitz_pi(int nelements)

int main(int argc, char* argv[])
{
bp_util_type bp = bp_util_create(argc, argv, 2);// Grab arguments
bp_util_type bp = bp_util_create(argc, argv, 1);// Grab arguments
if (bp.args.has_error) {
return 1;
}
const int nelements = bp.args.sizes[0] * bp.args.sizes[1];
const int nelements = bp.args.sizes[0];

bp.timer_start(); // Start timer
double pi = 4.0*leibnitz_pi(nelements); // Run benchmark
Expand Down
61 changes: 61 additions & 0 deletions suites/pact16_BHvsC.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
from benchpress.default import *
import copy

scripts = [
('Black Scholes', 'black_scholes', '--size=15000000*40'),
('Heat Equation', 'heat_equation', '--size=12000*12000*40'),
('Monte Carlo Pi', 'montecarlo_pi', '--size=100000000*40'),
('Leibnitz Pi', 'leibnitz_pi', '--size=700000000'),
('Rosenbrock', 'rosenbrock', '--size=200000000*40'),
]

def fuse_cache(value):
envs = ["BH_SINGLETON_FUSE_CACHE", "BH_TOPOLOGICAL_FUSE_CACHE",\
"BH_GREEDY_FUSE_CACHE", "BH_OPTIMAL_FUSE_CACHE", "BH_GENTLE_FUSE_CACHE"]
ret = {}
for env in envs:
ret[env] = value
return ret

def cache_path(value, out={}):
envs = ["BH_SINGLETON_CACHE_PATH", "BH_TOPOLOGICAL_CACHE_PATH",\
"BH_GREEDY_CACHE_PATH", "BH_OPTIMAL_CACHE_PATH", "BH_GENTLE_CACHE_PATH"]
for env in envs:
out[env] = value
return out

stack = [
[('default', 'bridge', None)],
[('bccon', 'bccon', None)],
[
('UniqueViews', 'bcexp', {'BH_PRICE_MODEL':'unique_views'}),
],
[
('Greedy', 'greedy', None),
],
[
('memcache', 'node', cache_path("", fuse_cache("true"))),
],
[
('cpu*1', 'cpu', {"BH_CPU_JIT_LEVEL": "3", "OMP_NUM_THREADS":"1"}),
('cpu*4', 'cpu', {"BH_CPU_JIT_LEVEL": "3", "OMP_NUM_THREADS":"4"}),
],
]

suite_bohrium = {
'scripts': scripts,
'launchers': [python_bohrium],
'bohrium': stack
}

suite_c = {
'scripts': scripts,
'launchers': [c99_seq, python_numpy],
'bohrium': bh_stack_none
}

suites = [
suite_bohrium,
suite_c,
]

2 changes: 1 addition & 1 deletion suites/pact16_greedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
('Gauss Elimination', 'gauss', '--size=2800'),
('LU Factorization', 'lu', '--size=2800'),
('Monte Carlo Pi', 'montecarlo_pi', '--size=100000000*40'),
('Leibnitz Pi', 'leibnitz_pi', '--size=100000000*40'),
('Leibnitz Pi', 'leibnitz_pi', '--size=700000000'),
('27 Point Stencil', 'point27', '--size=350*40'),
('Rosenbrock', 'rosenbrock', '--size=200000000*40'),
]
Expand Down

0 comments on commit cbc3aa7

Please sign in to comment.