diff --git a/examples/cc_barrier.h b/examples/cc_barrier.h index 61ffbd0..d6452d6 100644 --- a/examples/cc_barrier.h +++ b/examples/cc_barrier.h @@ -166,6 +166,7 @@ static int __algorithm_recursive_doubling_proc( void *context ) return rc; } +#if 0 static int __algorithm_recursive_doubling_check( void *context ) { int rc = 0; @@ -196,6 +197,56 @@ static int __algorithm_recursive_doubling_check( void *context ) return rc; } +#endif +static int __algorithm_recursive_doubling_check2( void *context ) +{ + int rc = 0; + struct cc_context *ctx = context; + int num_proc = ctx->conf.num_proc; + int my_proc = ctx->conf.my_proc; + int i; + int *check_array = NULL; + MPI_Request *reqs = NULL; + MPI_Status *statuses = NULL; + if (0 == my_proc) { + check_array = calloc(num_proc,sizeof(int)); + reqs = calloc(num_proc,sizeof(MPI_Request)); + statuses = calloc(num_proc, sizeof(MPI_Status)); + for (i=0; iconf.check && ctx->conf.algorithm->check) { rc = ctx->conf.algorithm->check(ctx); - log_trace("check accuracy (self-test) result is %s\n", (rc ? "FAIL" : "OK")); + log_fatal("check accuracy (self-test) result is %s\n", (rc ? "FAIL" : "OK")); } if (!rc && ctx->conf.warmup) {