From cbc3aa7f63431f54362ad00838094323f7bb33e5 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Tue, 12 Jul 2016 15:28:28 +0200 Subject: [PATCH] updated the fuse paper suite --- .../leibnitz_pi/c99_seq/src/leibnitz_pi.c | 4 +- .../leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp | 4 +- suites/pact16_BHvsC.py | 61 +++++++++++++++++++ suites/pact16_greedy.py | 2 +- 4 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 suites/pact16_BHvsC.py diff --git a/benchmarks/leibnitz_pi/c99_seq/src/leibnitz_pi.c b/benchmarks/leibnitz_pi/c99_seq/src/leibnitz_pi.c index 2e1572c8..de344c20 100644 --- a/benchmarks/leibnitz_pi/c99_seq/src/leibnitz_pi.c +++ b/benchmarks/leibnitz_pi/c99_seq/src/leibnitz_pi.c @@ -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 diff --git a/benchmarks/leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp b/benchmarks/leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp index d85f2617..c231491c 100644 --- a/benchmarks/leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp +++ b/benchmarks/leibnitz_pi/cpp11_omp/src/leibnitz_pi.cpp @@ -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 diff --git a/suites/pact16_BHvsC.py b/suites/pact16_BHvsC.py new file mode 100644 index 00000000..49959551 --- /dev/null +++ b/suites/pact16_BHvsC.py @@ -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, +] + diff --git a/suites/pact16_greedy.py b/suites/pact16_greedy.py index dc80813f..5b9a548d 100644 --- a/suites/pact16_greedy.py +++ b/suites/pact16_greedy.py @@ -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'), ]