Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
879 Discussions

libiomp5 5.0.20260213 worker-thread leak with std::thread

SoShiny
Beginner
51 Views

I noticed our C++ test suite got 50% slower moving from iomp 2023 -> iomp 2026.

We use std::thread to run code which uses OMP parallel regions.
It looks like that libiomp5 does not clean up the the worker threads properly when the std thread joins. The result is that thousands of threads are being kept around during our test suite.

Using the iomp library of OneAPI 2025 the expected behavior is restored (the number of observed threads is equal to the OMP_NUM_THREADS specified).

 

A minimal reproducer and write-up can be found here: SoShiny/thread_and_omp_issue: Minimal reproducer for std::tread + OMP issue.

Please advise.

0 Kudos
2 Replies
Sravani_K_Intel
Moderator
38 Views

Thank you for the reproducer, we will investigate this further. 

0 Kudos
Xiaoping_D_Intel
Employee
14 Views

I can reproduce the behavior with 2026.1 and have opened a bug report for it.


0 Kudos
Reply