!UNVBThoJtlIiVwiDjU:nixos.org

Staging

394 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.orgemilybecause it sets a bunch of other stuff too13:48:12
@emilazy:matrix.orgemilyadmittedly "tell you're about to do OpenMP stuff" might be complicated13:48:34
@dramforever:matrix.orgdramforeveropenmp and mpi are almost unrelated13:48:47
@dramforever:matrix.orgdramforevermight explain why13:48:59
@emilazy:matrix.orgemilywell13:49:06
@emilazy:matrix.orgemily mpiCheckPhaseHook sets OMP_NUM_THREADS 13:49:11
@emilazy:matrix.orgemilyso maybe I'm not the only one confused by this :P13:49:23
@dramforever:matrix.orgdramforevermight explain why stuff aren't using it i mean13:49:23
@grimmauld:m.grimmauld.deGrimmauld (any/all) okay other idea 13:49:41
@emilazy:matrix.orgemilyall of these things have to be depending on OpenMP already right? couldn't we just put a setup hook on OpenMP itself to set the var13:49:54
@grimmauld:m.grimmauld.deGrimmauld (any/all) it might not depend directly. Biggest problem has been python things running via numpy/scipy 13:50:51
@emilazy:matrix.orgemilygive those a setup hook then? :)13:51:12
@vcunat:matrix.orgVladimír ČunátThe variable shouldn't hurt to have everywhere in builds (by default), no?13:51:33
@hexa:lossy.networkhexaand they do it via blas I think13:51:43
@vcunat:matrix.orgVladimír Čunát* The variable shouldn't hurt to have everywhere in builds (by default), no? Or possibly just in the check phases.13:52:29
@emilazy:matrix.orgemily probably not, and I could see an argument for "we should just set every relevant environment variable for ~everything in stdenv". but that might be an annoying practice to follow in general, e.g. would turn various kinds of flag changes into world rebuilds. and then it doesn't scale if you also need to say, point something at a path or whatever (which mpiCheckPhaseHook also happens to do) 13:53:02
@grimmauld:m.grimmauld.deGrimmauld (any/all) add mpiCheckPhaseHook to blas propagatedBuildInputs ? 13:53:08
@emilazy:matrix.orgemilyso feels like doing it closer to the problem makes sense by default13:53:25
@emilazy:matrix.orgemilynot sure what it is with Python things and using all the cores all the time13:53:52
@hexa:lossy.networkhexadefault numpy/scipy behavior13:54:10
@hexa:lossy.networkhexathey scale right up13:54:16
@grimmauld:m.grimmauld.deGrimmauld (any/all)python has checks-by-default, and numpy/scipy abstracts away the compute cost of tests13:54:20
@emilazy:matrix.orgemilyright13:54:25
@hexa:lossy.networkhexathe real deal would be faking nproc for builds13:55:03
@emilazy:matrix.orgemilyprobably just adding setup hooks to those is sufficient then? or the Python check phase could yell at you if it sees them in the dep graph but not a corresponding hook…13:55:18
@vcunat:matrix.orgVladimír ČunátIIRC cgroups only allow you to pin to particular subset of cores.13:56:24
@vcunat:matrix.orgVladimír Čunát* IIRC cgroups only allow you to restrict to particular subset of cores.13:56:43
@vcunat:matrix.orgVladimír Čunát* IIRC cgroups only allow you to restrict to a particular subset of cores.13:56:50
@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

Show newer messages


Back to Room ListRoom Version: 6