diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-09-30 13:09:56 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-10-03 18:59:25 +0200 |
commit | 9503adb6660010f132f5574a4d0233aff067367d (patch) | |
tree | ac02dd1734113e869c6d9ee5cb3d5e0eb94f123e | |
parent | f47328b3c0ec7b09834aedfc68997266e145f844 (diff) | |
download | nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar.gz nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar.bz2 nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar.lz nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar.xz nixlib-9503adb6660010f132f5574a4d0233aff067367d.tar.zst nixlib-9503adb6660010f132f5574a4d0233aff067367d.zip |
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
-rw-r--r-- | pkgs/development/python-modules/scipy/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index aa578d21d257..e791454b9018 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -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 |