浏览代码

Also avoid letting _starpu_omp_dummy_shutdown drop keys when omp was started

Samuel Thibault 10 年之前
父节点
当前提交
378077355a
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/util/openmp_runtime_support.c

+ 5 - 2
src/util/openmp_runtime_support.c

@@ -869,8 +869,11 @@ void _starpu_omp_dummy_init(void)
  */
 void _starpu_omp_dummy_shutdown(void)
 {
-	STARPU_PTHREAD_KEY_DELETE(omp_thread_key);
-	STARPU_PTHREAD_KEY_DELETE(omp_task_key);
+	if (_starpu_omp_global_state != &_global_state)
+	{
+		STARPU_PTHREAD_KEY_DELETE(omp_thread_key);
+		STARPU_PTHREAD_KEY_DELETE(omp_task_key);
+	}
 }
 
 /*