python3Packages.scipy: Limit OpenMP threads during check phase

The scipy tests already run in parallel and the openmp threads come on
top of that. That overloads machines very easily and therefore we
introduce a scaling limit to the number of openmp threads used.

https://www.openmp.org/spec-html/5.0/openmpse50.html
This commit is contained in:
Martin Weinelt 2022-09-30 13:09:56 +02:00
parent f47328b3c0
commit 9503adb666
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -54,6 +54,7 @@ buildPythonPackage rec {
checkPhase = ''
runHook preCheck
pushd "$out"
export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 ))
${python.interpreter} -c "import scipy; scipy.test('fast', verbose=10, parallel=$NIX_BUILD_CORES)"
popd
runHook postCheck