python3Packages.numpy: fix tests for >64 core machines
This commit is contained in:
parent
d72a58a684
commit
8f7cec2297
1 changed files with 4 additions and 0 deletions
|
@ -58,9 +58,13 @@ in buildPythonPackage rec {
|
||||||
./numpy-distutils-C++.patch
|
./numpy-distutils-C++.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# we default openblas to build with 64 threads
|
||||||
|
# if a machine has more than 64 threads, it will segfault
|
||||||
|
# see https://github.com/xianyi/OpenBLAS/issues/2993
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -i 's/-faltivec//' numpy/distutils/system_info.py
|
sed -i 's/-faltivec//' numpy/distutils/system_info.py
|
||||||
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
|
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
|
||||||
|
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
|
Loading…
Reference in a new issue