Skip to content
Snippets Groups Projects
Commit de45cae5 authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

online: Disable parallel sorting to prevent memleak from libTBB

parent eec2510c
No related branches found
No related tags found
1 merge request!1757online: Disable parallel sorting to prevent memleak from libTBB
Pipeline #28835 passed
......@@ -6,6 +6,10 @@
#include <string>
#if __has_include(<execution>) && !defined(__CLING__)
#include <execution> // for feature test macro __cpp_lib_parallel_algorithm
#endif
#if defined(HAVE_TBB) && defined(__cpp_lib_parallel_algorithm)
#define HAVE_PARALLEL_ALGORITHM
#endif
......
......@@ -19,8 +19,7 @@
#include <algorithm>
#if defined(__cpp_lib_execution) && defined(HAVE_PARALLEL_ALGORITHM)
#define WITH_EXECUTION
#ifdef HAVE_PARALLEL_ALGORITHM
#include <execution>
#endif
......@@ -36,7 +35,11 @@ namespace cbm::algo
template<typename It, typename Compare>
void Sort(It first, It last, Compare comp)
{
#ifdef WITH_EXECUTION
// Disable parallel sorting for the moment
// The underlying implementation in libTBB has a massive memory leak:
// https://community.intel.com/t5/Intel-oneAPI-Threading-Building/std-sort-std-execution-par-unseq-has-a-memory-leak-on-Linux/m-p/1580910
#if 0
// #ifdef HAVE_PARALLEL_ALGORITHM
std::sort(std::execution::par_unseq, first, last, comp);
#else
std::sort(first, last, comp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment