From 29879bd1401e9b2566823bf7722355d82ea11097 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 10 Jul 2026 08:41:27 +0000 Subject: [PATCH 1/2] FIX only warn about libomp/libiomp conflict on Linux The incompatibility between Intel and LLVM OpenMP runtimes is documented as a Linux-specific issue. Emitting the warning on Windows caused CI failures in the conda-forge MKL job because pytest runs with -W error. Co-authored-by: Olivier Grisel --- CHANGES.md | 7 +++++++ threadpoolctl.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 7040d695..ae7b0704 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +3.7.0 (TBD) +=========== + +- Only warn about simultaneous `libomp` and `libiomp` usage on Linux, where the + incompatibility is known to cause crashes. This avoids spurious test failures on + Windows CI jobs that load both libraries via conda-forge MKL stacks. + 3.6.0 (2025-03-13) ================== diff --git a/threadpoolctl.py b/threadpoolctl.py index ceed5b88..c0c41a53 100644 --- a/threadpoolctl.py +++ b/threadpoolctl.py @@ -1215,6 +1215,13 @@ def _check_prefix(self, library_basename, filename_prefixes): def _warn_if_incompatible_openmp(self): """Raise a warning if llvm-OpenMP and intel-OpenMP are both loaded""" + if sys.platform != "linux": + # The incompatibility between libomp and libiomp is known to cause + # crashes on Linux. On other platforms, conda-forge may expose both + # libraries without the same runtime conflict (for instance when + # libiomp forwards to libomp on Windows). + return + prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers] msg = textwrap.dedent( """ From d68b8ea5eb892c5e0a7ba4844167acd3f5f9bae4 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Fri, 10 Jul 2026 14:17:19 +0200 Subject: [PATCH 2/2] Apply suggestion from @ogrisel --- CHANGES.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ae7b0704..65d523e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,8 +2,7 @@ =========== - Only warn about simultaneous `libomp` and `libiomp` usage on Linux, where the - incompatibility is known to cause crashes. This avoids spurious test failures on - Windows CI jobs that load both libraries via conda-forge MKL stacks. + incompatibility is known to cause crashes. 3.6.0 (2025-03-13) ==================