From f49a7e32fc8422fc1074921b4b39a66d707e346b Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Wed, 17 Oct 2018 13:50:04 +0100 Subject: [PATCH] Bugfix #106 mostly. --- src/mdtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mdtest.c b/src/mdtest.c index ff2cf29..b43e0d2 100644 --- a/src/mdtest.c +++ b/src/mdtest.c @@ -2336,12 +2336,11 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE * } else if (branch_factor == 1) { num_dirs_in_tree = depth + 1; } else { - num_dirs_in_tree = - (1 - pow(branch_factor, depth+1)) / (1 - branch_factor); + num_dirs_in_tree = (pow(branch_factor, depth+1) - 1) / (branch_factor - 1); } } if (items_per_dir > 0) { - if(unique_dir_per_task){ + if(items == 0){ items = items_per_dir * num_dirs_in_tree; }else{ num_dirs_in_tree_calc = num_dirs_in_tree;