Commit b1f09c1f authored by Nicolas Winkler's avatar Nicolas Winkler
Browse files

fixing not parallel bug

parent 64fba216
......@@ -49,10 +49,9 @@ def run_all_single_node(base_build_dir: str):
os.environ["OMP_NUM_THREADS"] = str(num_threads)
# resolve placeholders
run_cmd = run_config["run-cmd"].format(num_threads,
run_cmd = run_config["run-cmd"].format(num_threads, 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("")
......
......@@ -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