ソースを参照

mpi: fix tests

Philippe SWARTVAGHER 4 年 前
コミット
df859265a5
共有3 個のファイルを変更した9 個の追加2 個の削除を含む
  1. 1 1
      mpi/examples/benchs/bench_helper.h
  2. 6 1
      mpi/examples/benchs/sendrecv_parallel_tasks_bench.c
  3. 2 0
      mpi/tests/mpi_scatter_gather.c

+ 1 - 1
mpi/examples/benchs/bench_helper.h

@@ -22,7 +22,7 @@
 
 #ifdef STARPU_QUICK_CHECK
 	#define MULT_DEFAULT 4
-	#define LOOPS_DEFAULT 100
+	#define LOOPS_DEFAULT 50
 	#define NX_MAX (64 * 1024 * 1024) // kB
 #elif !defined(STARPU_LONG_CHECK)
 	#define MULT_DEFAULT 4

+ 6 - 1
mpi/examples/benchs/sendrecv_parallel_tasks_bench.c

@@ -49,7 +49,12 @@
 void cpu_task(void* descr[], void* args)
 {
 	int mpi_rank;
-	uint64_t iterations = LOOPS_DEFAULT / 100;
+	uint64_t iterations =
+#ifdef STARPU_QUICK_CHECK
+		10;
+#else
+	LOOPS_DEFAULT / 100;
+#endif
 	uint64_t s;
 	starpu_data_handle_t handle_send, handle_recv;
 	double t1, t2;

+ 2 - 0
mpi/tests/mpi_scatter_gather.c

@@ -192,6 +192,8 @@ int main(int argc, char **argv)
 	// Free memory
 	free(data_handles);
 
+	starpu_mpi_barrier(MPI_COMM_WORLD); // Why adding a barrier helps to to avoid a blocking at the end of the program (observed with nmad) ?
+
 	starpu_mpi_shutdown();
 	return (rank == 0) ? ret : 0;
 }