瀏覽代碼

Fix termination hang: make sure all tasks are finished before shutting down

Samuel Thibault 13 年之前
父節點
當前提交
50996d4071
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/cg/cg.c

+ 2 - 1
examples/cg/cg.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010  Université de Bordeaux 1
+ * Copyright (C) 2010-2011  Université de Bordeaux 1
  *
  * 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
@@ -374,6 +374,7 @@ int main(int argc, char **argv)
 
 	ret = check();
 
+	starpu_task_wait_for_all();
 	starpu_helper_cublas_shutdown();
 	starpu_shutdown();