Skip to content

Commit 3584545

Browse files
authored
Fix OpenMP resource cleanup (#479)
1 parent b6d3381 commit 3584545

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/core/task/include/task.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include <omp.h>
4+
35
#include <algorithm>
46
#include <chrono>
57
#include <core/util/include/util.hpp>
@@ -177,6 +179,9 @@ class Task {
177179
} else {
178180
functions_order_.clear();
179181
}
182+
#if _OPENMP >= 201811
183+
omp_pause_resource_all(omp_pause_soft);
184+
#endif
180185
}
181186

182187
protected:

0 commit comments

Comments
 (0)