Browse Source

Fix freeing matrix before shutting down StarPU

Samuel Thibault 5 years ago
parent
commit
1cbc21d647
1 changed files with 3 additions and 3 deletions
  1. 3 3
      mpi/examples/matrix_decomposition/mpi_cholesky.c

+ 3 - 3
mpi/examples/matrix_decomposition/mpi_cholesky.c

@@ -55,9 +55,6 @@ int main(int argc, char **argv)
 
 	dw_cholesky(bmat, size/nblocks, rank, nodes, &timing, &flops);
 
-	starpu_cublas_shutdown();
-	starpu_mpi_shutdown();
-
 #ifndef STARPU_SIMGRID
 	matrix_display(bmat, rank);
 
@@ -67,6 +64,9 @@ int main(int argc, char **argv)
 
 	matrix_free(&bmat, rank, nodes, 1);
 
+	starpu_cublas_shutdown();
+	starpu_mpi_shutdown();
+
 #ifndef STARPU_SIMGRID
 	if (check)
 		assert(correctness);