diff --git a/CHANGES.md b/CHANGES.md index 7040d695..65d523e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +3.7.0 (TBD) +=========== + +- Only warn about simultaneous `libomp` and `libiomp` usage on Linux, where the + incompatibility is known to cause crashes. + 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( """