Browse Source

Make sure we wait for all running tasks before unregistering data

Samuel Thibault 7 years ago
parent
commit
e2e7f733bb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      examples/heat/dw_sparse_cg.c

+ 2 - 0
examples/heat/dw_sparse_cg.c

@@ -448,6 +448,8 @@ void conjugate_gradient(float *nzvalA, float *vecb, float *vecx, uint32_t nnz,
 	sem_wait(&sem);
 	sem_destroy(&sem);
 
+	starpu_task_wait_for_all();
+
 	print_results(vecx, nrow);
 
 	starpu_data_unregister(ds_matrixA);