Commit a9777e07 authored by prayagas's avatar prayagas
Browse files

Merge commit '4cf5b029' into euler/bench

parents c55f0020 4cf5b029
......@@ -51,8 +51,7 @@ def run_all_single_node(base_build_dir: str):
# resolve placeholders
run_cmd = run_config["run-cmd"].format(num_threads,
num_runs, size_configs)
if "kokkos" in build_dir:
run_cmd = run_cmd + "--kokkos-threads=" + str(num_threads)
print("running: cd {}; {}".format(build_dir, run_cmd))
subprocess.call("cd {}; {}".format(build_dir, run_cmd), shell=True)
print("")
......
......@@ -45,12 +45,12 @@
},
{
"build-dir": "lu_kokkos/build",
"run-cmd": "./lu_bench.o {0} {1} {2}",
"run-cmd": "./lu_bench.o --kokkos-threads={0} {0} {1} {2}",
"num-runs": 20
},
{
"build-dir": "lu_kokkos_dag/build",
"run-cmd": "./lu_bench.o {0} {1} {2}",
"run-cmd": "./lu_bench.o --kokkos-threads={0} {0} {1} {2}",
"num-runs": 20
},
{
......
......@@ -44,17 +44,15 @@ int bench_kokkos(int run_id, BenchUtil &bench, int num_runs, int matrix_size, in
int main(int argc, char **argv)
{
int num_threads = stoi(argv[1]);
omp_set_dynamic(-1);
omp_set_num_threads(num_threads);
char envset[64];
sprintf(envset, "OMP_NUM_THREADS=%d", num_threads);
putenv(envset);
// init
BenchUtil bench("lu_kokkos");
Kokkos::initialize(argc, argv);
int num_threads = stoi(argv[1]);
omp_set_dynamic(-1);
omp_set_num_threads(num_threads);
if (argc < 3 || argc % 2 != 1)
{
printf("incorrect number of args\n");
......
......@@ -53,18 +53,14 @@ int bench_kokkos_dag(int run_id, BenchUtil &bench, int num_runs, int matrix_size
int main(int argc, char **argv)
{
int num_threads = stoi(argv[1]);
omp_set_dynamic(-1);
omp_set_num_threads(num_threads);
char envset[64];
sprintf(envset, "OMP_NUM_THREADS=%d", num_threads);
putenv(envset);
// init
BenchUtil bench("lu_kokkos_dag");
Kokkos::initialize(argc, argv);
int num_threads = stoi(argv[1]);
//omp_set_dynamic(-1);
//omp_set_num_threads(num_threads);
if (argc < 3 || argc % 2 != 1)
{
printf("incorrect number of args\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment