!UNVBThoJtlIiVwiDjU:nixos.org

Staging

393 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.11 | Review Reports: https://malob.github.io/nix-review-tools-reports/127 Servers

Load older messages


SenderMessageTime
26 Jun 2026
@emilazy:matrix.orgemilythe real real deal would be NumPy supporting jobserver protocol and also jobserver protocol being good13:56:55
@grimmauld:m.grimmauld.deGrimmauld (any/all)
diff --git a/pkgs/by-name/bl/blas/package.nix b/pkgs/by-name/bl/blas/package.nix
index 01ad1839c339..85e2e2cb3412 100644
--- a/pkgs/by-name/bl/blas/package.nix
+++ b/pkgs/by-name/bl/blas/package.nix
@@ -3,6 +3,7 @@
   stdenv,
   lapack-reference,
   openblas,
+  mpiCheckPhaseHook,
   isILP64 ? false,
   blasProvider ? openblas,
 }:
@@ -186,6 +187,10 @@ stdenv.mkDerivation {
     "dev"
   ];
 
+  propagatedBuildInputs = [
+    mpiCheckPhaseHook
+  ];
+
   meta = (blasProvider'.meta or { }) // {
     description = "${lib.getName blasProvider} with just the BLAS C and FORTRAN ABI";
   };
diff --git a/pkgs/development/python-modules/numpy/2.nix b/pkgs/development/python-modules/numpy/2.nix
index 67c60475fd5f..0fc2a30f3555 100644
--- a/pkgs/development/python-modules/numpy/2.nix
+++ b/pkgs/development/python-modules/numpy/2.nix
@@ -91,7 +91,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))
   '';
 
   buildInputs = [
diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix
index cdecd986e4ef..30999320f1e8 100644
--- a/pkgs/development/python-modules/scipy/default.nix
+++ b/pkgs/development/python-modules/scipy/default.nix
@@ -190,11 +190,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
   '';
 
i guess?
13:57:17
@emilazy:matrix.orgemily(or operating systems being good but then we'd be out of a job)13:57:26
@emilazy:matrix.orgemilyI think it won't propagate further than one layer.13:57:44
@grimmauld:m.grimmauld.deGrimmauld (any/all) python dependencies are fully propagated 13:58:01
@grimmauld:m.grimmauld.deGrimmauld (any/all)oh wait indeed blas isn't a propagated dep though13:58:19
@emilazy:matrix.orgemilyoh right13:58:10
@grimmauld:m.grimmauld.deGrimmauld (any/all)sorry13:58:21
@emilazy:matrix.orgemily probably just putting the hook in propagatedNativeBuildInputs of NumPy is the way. (wondering what the difference between OpenMP and MPI actually is…) 13:58:52
@grimmauld:m.grimmauld.deGrimmauld (any/all) multi-core vs multi-node afaiu 13:59:41
@emilazy:matrix.orgemily maybe we should have an openmpCheckPhaseHook that mpiCheckPhaseHook propgates then :P 14:00:04
@grimmauld:m.grimmauld.deGrimmauld (any/all) but yeah, throwing it in propagatedNativeBuildInputs of numpy sounds like a plan a little less drastic than just throwing it in stdenv 14:00:21
@emilazy:matrix.orgemily fwiw, OMP_NUM_THREADS turns up a surprising number of non-Python things 14:00:25
@emilazy:matrix.orgemilylooks like BLAS/LAPACK stuff. so maybe putting a hook in there is a good idea too.14:00:41
@grimmauld:m.grimmauld.deGrimmauld (any/all) Most of them link one of blas/lapack/libomp i'd guess? 14:00:54
@emilazy:matrix.orgemily yeah I dunno. all that stuff is a mystery to me. there's llvmPackages.openmp too? 14:01:08
@grimmauld:m.grimmauld.deGrimmauld (any/all)yeah14:01:16
@grimmauld:m.grimmauld.deGrimmauld (any/all)openmp gets compiled in, usually. Unless you do weird stuff :tm: and you can link it14:01:35
@grimmauld:m.grimmauld.deGrimmauld (any/all)and then there is boost that can optionally use omp/cuda too14:01:49
@grimmauld:m.grimmauld.deGrimmauld (any/all)its a whole mess14:01:57
@grimmauld:m.grimmauld.deGrimmauld (any/all) mpiCheckHook apparently defines the topology of the compute "cluster" to contain exactly one node (the nix builder), we can almost certainly skip that for just openmp things 14:03:16
@grimmauld:m.grimmauld.deGrimmauld (any/all)Scientific computing is a mess. I hate it, despite it being technically my field outside nix...14:04:17
@grimmauld:m.grimmauld.deGrimmauld (any/all) propagatedNativeCheckInputs when 14:06:23
@emilazy:matrix.orgemilyhuh, we don't have that?14:07:31
@emilazy:matrix.orgemilyshould be very harmless to propagate a hook like that unconditionally though14:07:49
@grimmauld:m.grimmauld.deGrimmauld (any/all) Yes, i agre 14:09:00
@rntpts:synapse.rntpts.derntptsgnu nproc respects cgroup limits since 9.8 (https://github.com/coreutils/coreutils/blob/57fe9ecd694459c44fa59b903d5dbb001f22ce66/NEWS#L531-L532)14:17:38
@grimmauld:m.grimmauld.deGrimmauld (any/all)* Yes, i agree14:09:03
@hexa:lossy.networkhexatools could be using all sorts of apis for guessing core count though14:18:02
@emilazy:matrix.orgemily CPU namespaces 14:19:11

Show newer messages


Back to Room ListRoom Version: 6