From befc788bee3b01eaff416ed9a52041e63b3bbea8 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 4 Jan 2026 15:08:35 -0500 Subject: [PATCH] dev-python/cython: suppress OpenMP parallelism in tests We already pass MAKEOPTS parallelism to the testsuite's -j option. Some of the tests also internally use OpenMP, and implicitly parallelize according to nproc. This consistently broke testing on the arm devbox, where nproc == 96, even if using low -j values like "10": ``` libgomp: Thread creation failed: Resource temporarily unavailable ``` We can't get libgomp to subscribe to a jobserver. We don't even know if e.g. steve is running, and cython itself doesn't use GNU Make (which would make its own jobserver). But we can reasonably assume cython's already-parallel testsuite will run as much parallelism as needed. We don't need OpenMP-based over-parallelization, it will always just cause harm. Disable it entirely. Signed-off-by: Eli Schwartz --- dev-python/cython/cython-3.1.7.ebuild | 4 ++++ dev-python/cython/cython-3.1.8.ebuild | 4 ++++ dev-python/cython/cython-3.2.3.ebuild | 6 +++++- dev-python/cython/cython-3.2.4.ebuild | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dev-python/cython/cython-3.1.7.ebuild b/dev-python/cython/cython-3.1.7.ebuild index 50e541c8414b8..5b79d143300b8 100644 --- a/dev-python/cython/cython-3.1.7.ebuild +++ b/dev-python/cython/cython-3.1.7.ebuild @@ -69,6 +69,10 @@ python_test() { # Needed to avoid confusing cache tests unset CYTHON_FORCE_REGEN + # uses $(nproc) to additionally parallelize many OpenMP-based jobs, + # leading to overcommitting + local -x OMP_NUM_THREADS=1 + tc-export CC local testargs=( diff --git a/dev-python/cython/cython-3.1.8.ebuild b/dev-python/cython/cython-3.1.8.ebuild index 3874d1e721664..cea99bf41054a 100644 --- a/dev-python/cython/cython-3.1.8.ebuild +++ b/dev-python/cython/cython-3.1.8.ebuild @@ -69,6 +69,10 @@ python_test() { # Needed to avoid confusing cache tests unset CYTHON_FORCE_REGEN + # uses $(nproc) to additionally parallelize many OpenMP-based jobs, + # leading to overcommitting + local -x OMP_NUM_THREADS=1 + tc-export CC local testargs=( diff --git a/dev-python/cython/cython-3.2.3.ebuild b/dev-python/cython/cython-3.2.3.ebuild index 23fc59df0adf0..1d9399568f5b9 100644 --- a/dev-python/cython/cython-3.2.3.ebuild +++ b/dev-python/cython/cython-3.2.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -69,6 +69,10 @@ python_test() { # Needed to avoid confusing cache tests unset CYTHON_FORCE_REGEN + # uses $(nproc) to additionally parallelize many OpenMP-based jobs, + # leading to overcommitting + local -x OMP_NUM_THREADS=1 + tc-export CC local testargs=( diff --git a/dev-python/cython/cython-3.2.4.ebuild b/dev-python/cython/cython-3.2.4.ebuild index f4ac503033bd1..1d9399568f5b9 100644 --- a/dev-python/cython/cython-3.2.4.ebuild +++ b/dev-python/cython/cython-3.2.4.ebuild @@ -69,6 +69,10 @@ python_test() { # Needed to avoid confusing cache tests unset CYTHON_FORCE_REGEN + # uses $(nproc) to additionally parallelize many OpenMP-based jobs, + # leading to overcommitting + local -x OMP_NUM_THREADS=1 + tc-export CC local testargs=(