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 <eschwartz@gentoo.org>
This commit is contained in:
Eli Schwartz
2026-01-04 15:08:35 -05:00
parent 61b6faf86b
commit befc788bee
4 changed files with 17 additions and 1 deletions

View File

@@ -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=(

View File

@@ -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=(

View File

@@ -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=(

View File

@@ -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=(