ump_bench: num_cores in main.c is number of spawned clients, so we wait for num_cores...
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Thu, 10 Nov 2016 12:40:16 +0000 (13:40 +0100)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Thu, 10 Nov 2016 12:41:29 +0000 (13:41 +0100)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

usr/bench/ump_bench/main.c

index e7c4f4e..8b0648a 100644 (file)
@@ -30,7 +30,7 @@ static void ump_init_msg(struct bench_binding *b, coreid_t id)
     array[id] = b;
 
     // All clients connected, run experiment
-    if (count + 1 == num_cores) {
+    if (count == num_cores) {
         for (coreid_t i = 0; i < MAX_CPUS; i++) {
             if (array[i]) {
                 experiment(i);
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
         char *xargv[] = {my_name, "dummy", NULL};
         err = spawn_program_on_all_cores(false, xargv[0], xargv, NULL,
                                          SPAWN_FLAGS_DEFAULT, NULL, &num_cores);
-           DEBUG_ERR(err, "spawn program on all cores (%"PRIuCOREID")", num_cores);
+        DEBUG_ERR(err, "spawn program on all cores (%"PRIuCOREID")", num_cores);
         assert(err_is_ok(err));
 
         /* Setup a server */