瀏覽代碼

mpi/examples: minor fixes

Nathalie Furmento 4 年之前
父節點
當前提交
53041f132b
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      mpi/examples/benchs/bcast_bench.c
  2. 2 2
      mpi/examples/benchs/bench_helper.c

+ 1 - 1
mpi/examples/benchs/bcast_bench.c

@@ -122,7 +122,7 @@ static int time_index(int size, int bench, int node)
 
 static void dummy_loop(int nb_dest_nodes, starpu_data_handle_t data_handle, int nb_nodes_id, int size_id, int bench_id)
 {
-	double t_end;
+	double t_end = 0.0;
 	int i;
 	starpu_data_handle_t time_handle;
 

+ 2 - 2
mpi/examples/benchs/bench_helper.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+ * Copyright (C) 2020-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -46,7 +46,7 @@ uint64_t bench_nb_iterations(int iterations, uint64_t len)
 {
 	const uint64_t max_data = NX_MAX;
 
-	if(len <= 0)
+	if(len == 0)
 		len = 1;
 
 	uint64_t data_size = ((uint64_t)iterations * (uint64_t)len);