mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.*: remove explicit OMP_NUM_THREADS definitions where numpy is used
This commit is contained in:
parent
b3944a1e30
commit
ef8b8d8f58
15 changed files with 6 additions and 44 deletions
|
|
@ -143,10 +143,6 @@ buildPythonPackage rec {
|
|||
|
||||
preCheck = ''
|
||||
export HOME="$(mktemp -d)"
|
||||
export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 ))
|
||||
if [ $OMP_NUM_THREADS -eq 0 ]; then
|
||||
export OMP_NUM_THREADS=1
|
||||
fi
|
||||
|
||||
# See https://github.com/astropy/astropy/issues/17649 and see
|
||||
# --hypothesis-profile=ci pytest flag below.
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@ buildPythonPackage rec {
|
|||
scikit-learn
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
disabledTestPaths =
|
||||
lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# These tests may fail if multiple builds run them at the same time due
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@ buildPythonPackage rec {
|
|||
six
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=2
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ buildPythonPackage rec {
|
|||
preCheck = ''
|
||||
cd $TMPDIR
|
||||
export HOME=$TMPDIR
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ buildPythonPackage (finalAttrs: {
|
|||
|
||||
preCheck = ''
|
||||
rm linearmodels/__init__.py
|
||||
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
disabledTestPaths = [
|
||||
|
|
|
|||
|
|
@ -82,10 +82,6 @@ buildPythonPackage (finalAttrs: {
|
|||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# _pickle.PickleError: ScriptFunction cannot be pickled
|
||||
"test_run_eval_fail_with_wrong_model"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
blas,
|
||||
lapack,
|
||||
|
||||
openmpCheckPhaseHook,
|
||||
|
||||
# Reverse dependency
|
||||
sage,
|
||||
|
||||
|
|
@ -93,7 +95,6 @@ buildPythonPackage (finalAttrs: {
|
|||
# see https://github.com/OpenMathLib/OpenBLAS/issues/2993
|
||||
preConfigure = ''
|
||||
sed -i 's/-faltivec//' numpy/distutils/system_info.py
|
||||
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
|
@ -110,6 +111,10 @@ buildPythonPackage (finalAttrs: {
|
|||
typing-extensions
|
||||
];
|
||||
|
||||
propagatedNativeBuildInputs = [
|
||||
openmpCheckPhaseHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
cd "$out"
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -93,10 +93,6 @@ buildPythonPackage (finalAttrs: {
|
|||
]
|
||||
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ mesonEmulatorHook ];
|
||||
|
||||
preConfigure = ''
|
||||
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 64 ? 64 : NIX_BUILD_CORES))
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ buildPythonPackage (finalAttrs: {
|
|||
preCheck = ''
|
||||
# Set config used by tests to ensure reproducibility
|
||||
echo 'pbc_tools_pbc_fft_engine = "NUMPY"' > pyscf/pyscf_config.py
|
||||
export OMP_NUM_THREADS=1
|
||||
ulimit -s 20000
|
||||
export PYSCF_CONFIG_FILE=$(pwd)/pyscf/pyscf_config.py
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ buildPythonPackage (finalAttrs: {
|
|||
# This is due to the Cython-compiled modules not being in the correct location
|
||||
# of the source tree.
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=$NIX_BUILD_CORES
|
||||
mkdir -p test && cd test
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -62,10 +62,6 @@ buildPythonPackage (finalAttrs: {
|
|||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
# only the $out dir contains the built cython extensions, so we run the tests inside there
|
||||
enabledTestPaths = [ "${placeholder "out"}/${python.sitePackages}/skbio" ];
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ buildPythonPackage rec {
|
|||
preCheck = ''
|
||||
cd $TMPDIR
|
||||
export HOME=$TMPDIR
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "sklearn" ];
|
||||
|
|
|
|||
|
|
@ -175,11 +175,6 @@ buildPythonPackage (finalAttrs: {
|
|||
'';
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 ))
|
||||
if [ $OMP_NUM_THREADS -eq 0 ]; then
|
||||
export OMP_NUM_THREADS=1
|
||||
fi
|
||||
|
||||
cd $out
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -185,10 +185,6 @@ buildPythonPackage (finalAttrs: {
|
|||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
pytestFlags = [
|
||||
# DeprecationWarning: Failing to pass a value to the 'type_params' parameter of
|
||||
# 'typing._eval_type' is deprecated, as it leads to incorrect behaviour when calling
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@ buildPythonPackage (finalAttrs: {
|
|||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=1
|
||||
'';
|
||||
|
||||
# RuntimeError: torch.compile is not supported on Python 3.14+
|
||||
disabledTests = lib.optionals (pythonAtLeast "3.14") [ "test_up" ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue