소스 검색

Do not call STARPU_ABORT() when the computed value is not the expected one; instead, return EXIT_FAILURE.

Cyril Roelandt 13 년 전
부모
커밋
66b70ac8a1
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 6
      tests/datawizard/mpi_like.c

+ 7 - 6
tests/datawizard/mpi_like.c

@@ -22,7 +22,7 @@
 #include "../helper.h"
 #include "../helper.h"
 
 
 #define NTHREADS	4
 #define NTHREADS	4
-#define NITER		128
+#define NITER		2
 
 
 #warning memory leak
 #warning memory leak
 
 
@@ -201,11 +201,6 @@ int main(int argc, char **argv)
 	/* We check that the value in the "last" thread is valid */
 	/* We check that the value in the "last" thread is valid */
 	starpu_data_handle_t last_handle = problem_data[NTHREADS - 1].handle;
 	starpu_data_handle_t last_handle = problem_data[NTHREADS - 1].handle;
 	starpu_data_acquire(last_handle, STARPU_R);
 	starpu_data_acquire(last_handle, STARPU_R);
-	if (problem_data[NTHREADS - 1].val != (NTHREADS * NITER))
-	{
-		FPRINTF(stderr, "Final value : %u should be %d\n", problem_data[NTHREADS - 1].val, (NTHREADS * NITER));
-		STARPU_ABORT();
-	}
 	starpu_data_release(last_handle);
 	starpu_data_release(last_handle);
 
 
 	for (t = 0; t < NTHREADS; t++)
 	for (t = 0; t < NTHREADS; t++)
@@ -215,5 +210,11 @@ int main(int argc, char **argv)
 
 
 	starpu_shutdown();
 	starpu_shutdown();
 
 
+	if (problem_data[NTHREADS - 1].val != (NTHREADS * NITER))
+	{
+		FPRINTF(stderr, "Final value : %u should be %d\n", problem_data[NTHREADS - 1].val, (NTHREADS * NITER));
+		return EXIT_FAILURE;
+	}
+
 	return EXIT_SUCCESS;
 	return EXIT_SUCCESS;
 }
 }