mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-25 07:08:13 -07:00
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:
@@ -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=(
|
||||
|
||||
@@ -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=(
|
||||
|
||||
@@ -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=(
|
||||
|
||||
@@ -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=(
|
||||
|
||||
Reference in New Issue
Block a user