git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #85636 from matthewbauer/blas-lapack-fix-fallout-from-83888

BLAS/LAPACK fix fallout from #83888

commitec21df329aef9b299dcedd46cc5901c670ac2726 authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateTue 21 Apr 2020, 19:59 (7 years ago) parente7593313c41d61
35 files changed+176−86
doc/languages-frameworks/python.section.md+3−26 doc/using/overlays.xml+114 pkgs/applications/science/chemistry/octopus/default.nix+1−1 pkgs/applications/science/machine-learning/shogun/default.nix+1−1 pkgs/applications/science/math/R/default.nix+1−1 pkgs/applications/science/math/giac/default.nix+1−1 pkgs/applications/science/math/gmsh/default.nix+1−1 pkgs/applications/science/math/sage/sage-env.nix+1−1 pkgs/applications/science/math/sage/sage-with-env.nix+1−1 pkgs/applications/science/math/sage/sagelib.nix+1−1 pkgs/build-support/alternatives/blas/default.nix+10−6 pkgs/build-support/alternatives/lapack/default.nix+9−5 pkgs/development/compilers/julia/1.3.nix+2−2 pkgs/development/compilers/julia/shared.nix+2−2 pkgs/development/interpreters/octave/default.nix+3−3 pkgs/development/libraries/fflas-ffpack/default.nix+1−1 pkgs/development/libraries/linbox/default.nix+1−1 pkgs/development/libraries/qrupdate/default.nix+1−1 pkgs/development/libraries/science/math/arpack/default.nix+1−1 pkgs/development/libraries/science/math/ipopt/default.nix+1−1 pkgs/development/libraries/science/math/magma/default.nix+2−9 pkgs/development/libraries/science/math/scalapack/default.nix+1−1 pkgs/development/libraries/science/math/scs/default.nix+1−1 pkgs/development/libraries/science/math/suitesparse/4.2.nix+1−1 pkgs/development/libraries/science/math/suitesparse/4.4.nix+1−1 pkgs/development/libraries/science/math/suitesparse/default.nix+1−1 pkgs/development/libraries/science/math/superlu/default.nix+1−1 pkgs/development/libraries/sundials/2.x.nix+1−1 pkgs/development/libraries/sundials/default.nix+1−1 pkgs/development/ocaml-modules/lacaml/default.nix+1−1 pkgs/development/ocaml-modules/owl/default.nix+1−1 pkgs/development/python-modules/cvxopt/default.nix+1−1 pkgs/development/python-modules/numpy/default.nix+3−5 pkgs/tools/misc/hpl/default.nix+1−1 pkgs/top-level/release-alternatives.nix+3−3
doc/languages-frameworks/python.section.md+3−26
@@ -1290,32 +1290,9 @@ self: super: {
12901290
12911291### How to use Intel's MKL with numpy and scipy?
12921292
1293−A `site.cfg` is created that configures BLAS based on the `blas` parameter of
1294−the `numpy` derivation. By passing in `mkl`, `numpy` and packages depending on
1295−`numpy` will be built with `mkl`.
1296−
1297−The following is an overlay that configures `numpy` to use `mkl`:
1298−
1299−```nix
1300−self: super: {
1301− python37 = super.python37.override {
1302− packageOverrides = python-self: python-super: {
1303− numpy = python-super.numpy.override {
1304− blas = super.pkgs.mkl;
1305− };
1306− };
1307− };
1308−}
1309−```
1310−
1311−`mkl` requires an `openmp` implementation when running with multiple processors.
1312−By default, `mkl` will use Intel's `iomp` implementation if no other is
1313−specified, but this is a runtime-only dependency and binary compatible with the
1314−LLVM implementation. To use that one instead, Intel recommends users set it with
1315−`LD_PRELOAD`.
1316−
1317−Note that `mkl` is only available on `x86_64-{linux,darwin}` platforms;
1318−moreover, Hydra is not building and distributing pre-compiled binaries using it.
1293+MKL can be configured using an overlay. See the section “[Using
1294+overlays to configure
1295+alternatives](#sec-overlays-alternatives-blas-lapack)”.
13191296
13201297### What inputs do `setup_requires`, `install_requires` and `tests_require` map to?
13211298
doc/using/overlays.xml+114
@@ -137,4 +137,118 @@ self: super:
137137 Overlays are similar to other methods for customizing Nixpkgs, in particular the <literal>packageOverrides</literal> attribute described in <xref linkend="sec-modify-via-packageOverrides"/>. Indeed, <literal>packageOverrides</literal> acts as an overlay with only the <varname>super</varname> argument. It is therefore appropriate for basic use, but overlays are more powerful and easier to distribute.
138138 </para>
139139 </section>
140+ <section xml:id="sec-overlays-alternatives">
141+ <title>Using overlays to configure alternatives</title>
142+ <para>
143+ Certain software has different implementations of the same
144+ interface. Other distributions have functionality to switch
145+ between these. For example, Debian provides <link
146+ xlink:href="https://wiki.debian.org/DebianAlternatives">DebianAlternatives</link>.
147+ Nixpkgs has what we call <literal>alternatives</literal>, which
148+ are configured through overlays.
149+ </para>
150+ <section xml:id="sec-overlays-alternatives-blas-lapack">
151+ <title>BLAS/LAPACK</title>
152+ <para>
153+ In Nixpkgs, we have multiple implementations of the BLAS/LAPACK
154+ numerical linear algebra interfaces. They are:
155+ </para>
156+ <itemizedlist>
157+ <listitem>
158+ <para>
159+ <link xlink:href="https://www.openblas.net/">OpenBLAS</link>
160+ </para>
161+ <para>
162+ The Nixpkgs attribute is <literal>openblas</literal> for
163+ ILP64 and <literal>openblasCompat</literal> for LP64. This
164+ is the default.
165+ </para>
166+ </listitem>
167+ <listitem>
168+ <para>
169+ <link xlink:href="http://www.netlib.org/lapack/">LAPACK
170+ reference</link> (also provides BLAS)
171+ </para>
172+ <para>
173+ The Nixpkgs attribute is <literal>lapack-reference</literal>.
174+ </para>
175+ </listitem>
176+ <listitem>
177+ <para>
178+ <link
179+ xlink:href="https://software.intel.com/en-us/mkl">Intel
180+ MKL</link> (only works on x86 architecture, unfree)
181+ </para>
182+ <para>
183+ The Nixpkgs attribute is <literal>mkl</literal>.
184+ </para>
185+ </listitem>
186+ </itemizedlist>
187+ <para>
188+ Introduced in <link
189+ xlink:href="https://github.com/NixOS/nixpkgs/pull/83888">PR
190+ #83888</link>, we are able to override the ‘blas’ and ‘lapack’
191+ packages to use different implementations, through the
192+ ‘blasProvider’ and ‘lapackProvider’ argument. This can be used
193+ to select a different provider. For example, an overlay can be
194+ created that looks like:
195+ </para>
196+ <programlisting>
197+self: super:
198+
199+{
200+ blas = super.blas.override {
201+ blasProvider = self.mkl;
202+ }
203+ lapack = super.lapack.override {
204+ lapackProvider = self.mkl;
205+ }
206+}
207+ </programlisting>
208+ <para>
209+ This overlay uses Intel’s MKL library for both BLAS and LAPACK
210+ interfaces. Note that the same can be accomplished at runtime
211+ using <literal>LD_PRELOAD</literal> of libblas.so.3 and
212+ liblapack.so.3.
213+ </para>
214+ <para>
215+ Intel MKL requires an <literal>openmp</literal> implementation
216+ when running with multiple processors. By default,
217+ <literal>mkl</literal> will use Intel’s <literal>iomp</literal>
218+ implementation if no other is specified, but this is a
219+ runtime-only dependency and binary compatible with the LLVM
220+ implementation. To use that one instead, Intel recommends users
221+ set it with <literal>LD_PRELOAD</literal>. Note that
222+ <literal>mkl</literal> is only available on
223+ <literal>x86_64-linux</literal> and
224+ <literal>x86_64-darwin</literal>. Moreover, Hydra is not build
225+ and distributing pre-compiled binaries using it.
226+ </para>
227+ <para>
228+ For BLAS/LAPACK switching to work correctly, all packages must
229+ depend on <literal>blas</literal> or <literal>lapack</literal>.
230+ This ensures that only one BLAS/LAPACK library is used at one
231+ time. There are two versions versions of BLAS/LAPACK currently
232+ in the wild, <literal>LP64</literal> (integer size = 32 bits)
233+ and <literal>ILP64</literal> (integer size = 64 bits). Some
234+ software needs special flags or patches to work with
235+ <literal>ILP64</literal>. You can check if
236+ <literal>ILP64</literal> is used in Nixpkgs with
237+ <varname>blas.isILP64</varname> and
238+ <varname>lapack.isILP64</varname>. Some software does NOT work
239+ with <literal>ILP64</literal>, and derivations need to specify
240+ an assertion to prevent this. You can prevent
241+ <literal>ILP64</literal> from being used with the following:
242+ </para>
243+ <programlisting>
244+{ stdenv, blas, lapack, ... }:
245+
246+assert (!blas.isILP64) &amp;&amp; (!lapack.isILP64);
247+
248+stdenv.mkDerivation {
249+ ...
250+}
251+ </programlisting>
252+ </section>
253+ </section>
140254</chapter>
pkgs/applications/science/chemistry/octopus/default.nix+1−1
@@ -2,7 +2,7 @@
22, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
33}:
44
5−assert (!blas.is64bit) && (!lapack.is64bit);
5+assert (!blas.isILP64) && (!lapack.isILP64);
66
77stdenv.mkDerivation rec {
88 pname = "octopus";
pkgs/applications/science/machine-learning/shogun/default.nix+1−1
@@ -13,7 +13,7 @@
1313assert pythonSupport -> pythonPackages != null;
1414assert opencvSupport -> opencv != null;
1515
16−assert (!blas.is64bit) && (!lapack.is64bit);
16+assert (!blas.isILP64) && (!lapack.isILP64);
1717
1818let
1919 pname = "shogun";
pkgs/applications/science/math/R/default.nix+1−1
@@ -9,7 +9,7 @@
99, static ? false
1010}:
1111
12−assert (!blas.is64bit) && (!lapack.is64bit);
12+assert (!blas.isILP64) && (!lapack.isILP64);
1313
1414stdenv.mkDerivation rec {
1515 name = "R-3.6.3";
pkgs/applications/science/math/giac/default.nix+1−1
@@ -5,7 +5,7 @@
55}:
66
77assert enableGUI -> libGLU != null && libGL != null && xorg != null && fltk != null;
8−assert (!blas.is64bit) && (!lapack.is64bit);
8+assert (!blas.isILP64) && (!lapack.isILP64);
99
1010stdenv.mkDerivation rec {
1111 pname = "giac${lib.optionalString enableGUI "-with-xcas"}";
pkgs/applications/science/math/gmsh/default.nix+1−1
@@ -1,7 +1,7 @@
11{ stdenv, fetchurl, cmake, blas, lapack, gfortran, gmm, fltk, libjpeg
22, zlib, libGL, libGLU, xorg, opencascade-occt }:
33
4−assert (!blas.is64bit) && (!lapack.is64bit);
4+assert (!blas.isILP64) && (!lapack.isILP64);
55
66stdenv.mkDerivation rec {
77 pname = "gmsh";
pkgs/applications/science/math/sage/sage-env.nix+1−1
@@ -54,7 +54,7 @@
5454, less
5555}:
5656
57−assert (!blas.is64bit) && (!lapack.is64bit);
57+assert (!blas.isILP64) && (!lapack.isILP64);
5858
5959# This generates a `sage-env` shell file that will be sourced by sage on startup.
6060# It sets up various environment variables, telling sage where to find its
pkgs/applications/science/math/sage/sage-with-env.nix+1−1
@@ -23,7 +23,7 @@
2323}:
2424
2525# lots of segfaults with (64 bit) blas
26−assert (!blas.is64bit) && (!lapack.is64bit);
26+assert (!blas.isILP64) && (!lapack.isILP64);
2727
2828# Wrapper that combined `sagelib` with `sage-env` to produce an actually
2929# executable sage. No tests are run yet and no documentation is built.
pkgs/applications/science/math/sage/sagelib.nix+1−1
@@ -53,7 +53,7 @@
5353, pplpy
5454}:
5555
56−assert (!blas.is64bit) && (!lapack.is64bit);
56+assert (!blas.isILP64) && (!lapack.isILP64);
5757
5858# This is the core sage python package. Everything else is just wrappers gluing
5959# stuff together. It is not very useful on its own though, since it will not
pkgs/build-support/alternatives/blas/default.nix+10−6
@@ -1,7 +1,7 @@
11{ lib, stdenv
22, lapack-reference, openblasCompat, openblas
3−, is64bit ? false
4−, blasProvider ? if is64bit then openblas else openblasCompat }:
3+, isILP64 ? false
4+, blasProvider ? if isILP64 then openblas else openblasCompat }:
55
66let
77 blasFortranSymbols = [
@@ -31,12 +31,12 @@ let
3131 else stdenv.hostPlatform.extensions.sharedLibrary;
3232
3333
34− is64bit = blasProvider.blas64 or false;
34+ isILP64 = blasProvider.blas64 or false;
3535 blasImplementation = lib.getName blasProvider;
3636
3737in
3838
39−assert is64bit -> (blasImplementation == "openblas" && blasProvider.blas64) || blasImplementation == "mkl";
39+assert isILP64 -> (blasImplementation == "openblas" && blasProvider.blas64) || blasImplementation == "mkl";
4040
4141stdenv.mkDerivation {
4242 pname = "blas";
@@ -49,7 +49,7 @@ stdenv.mkDerivation {
4949 };
5050
5151 passthru = {
52− inherit is64bit;
52+ inherit isILP64;
5353 provider = blasProvider;
5454 implementation = blasImplementation;
5555 };
@@ -58,6 +58,8 @@ stdenv.mkDerivation {
5858 dontConfigure = true;
5959 unpackPhase = "src=$PWD";
6060
61+ dontPatchELF = true;
62+
6163 installPhase = (''
6264 mkdir -p $out/lib $dev/include $dev/lib/pkgconfig
6365
@@ -132,6 +134,8 @@ Libs: -L$out/lib -lcblas
132134EOF
133135'' + stdenv.lib.optionalString (blasImplementation == "mkl") ''
134136 mkdir -p $out/nix-support
135− echo 'export MKL_INTERFACE_LAYER=${lib.optionalString is64bit "I"}LP64,GNU' > $out/nix-support/setup-hook
137+ echo 'export MKL_INTERFACE_LAYER=${lib.optionalString isILP64 "I"}LP64,GNU' > $out/nix-support/setup-hook
138+ ln -s $out/lib/libblas${canonicalExtension} $out/lib/libmkl_rt${stdenv.hostPlatform.extensions.sharedLibrary}
139+ ln -sf ${blasProvider}/include/* $dev/include
136140'');
137141}
pkgs/build-support/alternatives/lapack/default.nix+9−5
@@ -1,7 +1,7 @@
11{ lib, stdenv
22, lapack-reference, openblasCompat, openblas
3−, is64bit ? false
4−, lapackProvider ? if is64bit then openblas else openblasCompat }:
3+, isILP64 ? false
4+, lapackProvider ? if isILP64 then openblas else openblasCompat }:
55
66let
77
@@ -14,7 +14,7 @@ let
1414
1515in
1616
17−assert is64bit -> (lapackImplementation == "openblas" && lapackProvider.blas64) || lapackImplementation == "mkl";
17+assert isILP64 -> (lapackImplementation == "openblas" && lapackProvider.blas64) || lapackImplementation == "mkl";
1818
1919stdenv.mkDerivation {
2020 pname = "lapack";
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
2727 };
2828
2929 passthru = {
30− inherit is64bit;
30+ inherit isILP64;
3131 provider = lapackProvider;
3232 implementation = lapackImplementation;
3333 };
@@ -36,6 +36,8 @@ stdenv.mkDerivation {
3636 dontConfigure = true;
3737 unpackPhase = "src=$PWD";
3838
39+ dontPatchELF = true;
40+
3941 installPhase = (''
4042 mkdir -p $out/lib $dev/include $dev/lib/pkgconfig
4143
@@ -106,6 +108,8 @@ Libs: -L$out/lib -llapacke
106108EOF
107109'' + stdenv.lib.optionalString (lapackImplementation == "mkl") ''
108110 mkdir -p $out/nix-support
109− echo 'export MKL_INTERFACE_LAYER=${lib.optionalString is64bit "I"}LP64,GNU' > $out/nix-support/setup-hook
111+ echo 'export MKL_INTERFACE_LAYER=${lib.optionalString isILP64 "I"}LP64,GNU' > $out/nix-support/setup-hook
112+ ln -s $out/lib/liblapack${canonicalExtension} $out/lib/libmkl_rt${stdenv.hostPlatform.extensions.sharedLibrary}
113+ ln -sf ${lapackProvider}/include/* $dev/include
110114'');
111115}
pkgs/development/compilers/julia/1.3.nix+2−2
@@ -12,7 +12,7 @@
1212, CoreServices, ApplicationServices
1313}:
1414
15−assert (!blas.is64bit) && (!lapack.is64bit);
15+assert (!blas.isILP64) && (!lapack.isILP64);
1616
1717with stdenv.lib;
1818
@@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
8888 "SHELL=${stdenv.shell}"
8989
9090 "USE_SYSTEM_BLAS=1"
91− "USE_BLAS64=${if blas.is64bit then "1" else "0"}"
91+ "USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
9292
9393 "USE_SYSTEM_LAPACK=1"
9494
pkgs/development/compilers/julia/shared.nix+2−2
@@ -22,7 +22,7 @@
2222
2323with stdenv.lib;
2424
25−assert (!blas.is64bit) && (!lapack.is64bit);
25+assert (!blas.isILP64) && (!lapack.isILP64);
2626
2727let
2828 dsfmtVersion = "2.2.3";
@@ -137,7 +137,7 @@ stdenv.mkDerivation rec {
137137 "SHELL=${stdenv.shell}"
138138
139139 "USE_SYSTEM_BLAS=1"
140− "USE_BLAS64=${if blas.is64bit then "1" else "0"}"
140+ "USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
141141
142142 "USE_SYSTEM_LAPACK=1"
143143
pkgs/development/interpreters/octave/default.nix+3−3
@@ -53,7 +53,7 @@
5353, darwin
5454}:
5555
56−assert (!blas.is64bit) && (!lapack.is64bit);
56+assert (!blas.isILP64) && (!lapack.isILP64);
5757
5858stdenv.mkDerivation rec {
5959 version = "5.2.0";
@@ -125,12 +125,12 @@ stdenv.mkDerivation rec {
125125 enableParallelBuilding = true;
126126
127127 # See https://savannah.gnu.org/bugs/?50339
128− F77_INTEGER_8_FLAG = if blas.is64bit then "-fdefault-integer-8" else "";
128+ F77_INTEGER_8_FLAG = if blas.isILP64 then "-fdefault-integer-8" else "";
129129
130130 configureFlags = [
131131 "--with-blas=blas"
132132 "--with-lapack=lapack"
133− (if blas.is64bit then "--enable-64" else "--disable-64")
133+ (if blas.isILP64 then "--enable-64" else "--disable-64")
134134 ]
135135 ++ (if stdenv.isDarwin then [ "--enable-link-all-dependencies" ] else [ ])
136136 ++ stdenv.lib.optionals enableReadline [ "--enable-readline" ]
pkgs/development/libraries/fflas-ffpack/default.nix+1−1
@@ -2,7 +2,7 @@
22, gmpxx
33}:
44
5−assert (!blas.is64bit) && (!lapack.is64bit);
5+assert (!blas.isILP64) && (!lapack.isILP64);
66
77stdenv.mkDerivation rec {
88 pname = "fflas-ffpack";
pkgs/development/libraries/linbox/default.nix+1−1
@@ -10,7 +10,7 @@
1010, withSage ? false # sage support
1111}:
1212
13−assert (!blas.is64bit) && (!lapack.is64bit);
13+assert (!blas.isILP64) && (!lapack.isILP64);
1414
1515stdenv.mkDerivation rec {
1616 pname = "linbox";
pkgs/development/libraries/qrupdate/default.nix+1−1
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
1818 -e 's,^LAPACK=.*,LAPACK=-L${lapack}/lib -llapack,' \
1919 Makeconf
2020 ''
21− + stdenv.lib.optionalString blas.is64bit
21+ + stdenv.lib.optionalString blas.isILP64
2222 ''
2323 sed -i Makeconf -e '/^FFLAGS=.*/ s/$/-fdefault-integer-8/'
2424 '';
pkgs/development/libraries/science/math/arpack/default.nix+1−1
@@ -27,7 +27,7 @@ stdenv.mkDerivation {
2727
2828 cmakeFlags = [
2929 "-DBUILD_SHARED_LIBS=ON"
30− "-DINTERFACE64=${optionalString blas.is64bit "1"}"
30+ "-DINTERFACE64=${optionalString blas.isILP64 "1"}"
3131 ];
3232
3333 preCheck = if stdenv.isDarwin then ''
pkgs/development/libraries/science/math/ipopt/default.nix+1−1
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, unzip, blas, lapack, gfortran }:
22
3−assert (!blas.is64bit) && (!lapack.is64bit);
3+assert (!blas.isILP64) && (!lapack.isILP64);
44
55stdenv.mkDerivation rec {
66 pname = "ipopt";
pkgs/development/libraries/science/math/magma/default.nix+2−9
@@ -1,8 +1,4 @@
1−{ stdenv, fetchurl, cmake, gfortran, cudatoolkit, libpthreadstubs, lapack, blas
2−, mklSupport ? false, mkl ? null
3−}:
4−
5−assert !mklSupport || mkl != null;
1+{ stdenv, fetchurl, cmake, gfortran, cudatoolkit, libpthreadstubs, lapack, blas }:
62
73with stdenv.lib;
84
@@ -17,13 +13,10 @@ in stdenv.mkDerivation {
1713 name = "magma-${version}.tar.gz";
1814 };
1915
20− buildInputs = [ gfortran cudatoolkit libpthreadstubs cmake ]
21− ++ (if mklSupport then [ mkl ] else [ lapack blas ]);
16+ buildInputs = [ gfortran cudatoolkit libpthreadstubs cmake lapack blas ];
2217
2318 doCheck = false;
2419
25− MKLROOT = optionalString mklSupport mkl;
26−
2720 preConfigure = ''
2821 export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++
2922 '';
pkgs/development/libraries/science/math/scalapack/default.nix+1−1
@@ -2,7 +2,7 @@
22, gfortran, mpi, blas, lapack
33} :
44
5−assert (!blas.is64bit) && (!lapack.is64bit);
5+assert (!blas.isILP64) && (!lapack.isILP64);
66
77stdenv.mkDerivation rec {
88 pname = "scalapack";
pkgs/development/libraries/science/math/scs/default.nix+1−1
@@ -1,6 +1,6 @@
11{ stdenv, fetchFromGitHub, blas, lapack, gfortran, fixDarwinDylibNames }:
22
3−assert (!blas.is64bit) && (!lapack.is64bit);
3+assert (!blas.isILP64) && (!lapack.isILP64);
44
55stdenv.mkDerivation rec {
66 pname = "scs";
pkgs/development/libraries/science/math/suitesparse/4.2.nix+1−1
@@ -1,7 +1,7 @@
11{ stdenv, fetchurl, gfortran, blas, lapack }:
22
33let
4− int_t = if blas.is64bit then "int64_t" else "int32_t";
4+ int_t = if blas.isILP64 then "int64_t" else "int32_t";
55in
66stdenv.mkDerivation rec {
77 version = "4.2.1";
pkgs/development/libraries/science/math/suitesparse/4.4.nix+1−1
@@ -6,7 +6,7 @@ let
66 version = "4.4.4";
77 name = "suitesparse-${version}";
88
9− int_t = if blas.is64bit then "int64_t" else "int32_t";
9+ int_t = if blas.isILP64 then "int64_t" else "int32_t";
1010 SHLIB_EXT = stdenv.hostPlatform.extensions.sharedLibrary;
1111in
1212stdenv.mkDerivation {
pkgs/development/libraries/science/math/suitesparse/default.nix+1−1
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
4444 "BLAS=-lblas"
4545 "LAPACK=-llapack"
4646 "MY_METIS_LIB=-lmetis"
47− ] ++ stdenv.lib.optionals blas.is64bit [
47+ ] ++ stdenv.lib.optionals blas.isILP64 [
4848 "CFLAGS=-DBLAS64"
4949 ] ++ stdenv.lib.optionals enableCuda [
5050 "CUDA_PATH=${cudatoolkit}"
pkgs/development/libraries/science/math/superlu/default.nix+1−1
@@ -1,7 +1,7 @@
11{ stdenv, fetchurl, cmake,
22 gfortran, blas, lapack}:
33
4−assert (!blas.is64bit) && (!lapack.is64bit);
4+assert (!blas.isILP64) && (!lapack.isILP64);
55
66stdenv.mkDerivation rec {
77 version = "5.2.1";
pkgs/development/libraries/sundials/2.x.nix+1−1
@@ -8,7 +8,7 @@
88, gfortran
99, lapackSupport ? true }:
1010
11−assert (!blas.is64bit) && (!lapack.is64bit);
11+assert (!blas.isILP64) && (!lapack.isILP64);
1212
1313stdenv.mkDerivation rec {
1414 pname = "sundials";
pkgs/development/libraries/sundials/default.nix+1−1
@@ -7,7 +7,7 @@
77, gfortran
88, lapackSupport ? true }:
99
10−assert (!blas.is64bit) && (!lapack.is64bit);
10+assert (!blas.isILP64) && (!lapack.isILP64);
1111
1212stdenv.mkDerivation rec {
1313 pname = "sundials";
pkgs/development/ocaml-modules/lacaml/default.nix+1−1
@@ -1,7 +1,7 @@
11{ stdenv, fetchFromGitHub, darwin, ocaml, findlib, dune, base, stdio, lapack, blas }:
22
33assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.05.0";
4−assert (!blas.is64bit) && (!lapack.is64bit);
4+assert (!blas.isILP64) && (!lapack.isILP64);
55
66stdenv.mkDerivation rec {
77 pname = "ocaml${ocaml.version}-lacaml";
pkgs/development/ocaml-modules/owl/default.nix+1−1
@@ -11,7 +11,7 @@
1111, npy
1212}:
1313
14−assert (!blas.is64bit) && (!lapack.is64bit);
14+assert (!blas.isILP64) && (!lapack.isILP64);
1515assert blas.implementation == "openblas" && lapack.implementation == "openblas";
1616
1717buildDunePackage rec {
pkgs/development/python-modules/cvxopt/default.nix+1−1
@@ -14,7 +14,7 @@
1414, withFftw ? true
1515}:
1616
17−assert (!blas.is64bit) && (!lapack.is64bit);
17+assert (!blas.isILP64) && (!lapack.isILP64);
1818
1919buildPythonPackage rec {
2020 pname = "cvxopt";
pkgs/development/python-modules/numpy/default.nix+3−5
@@ -12,18 +12,16 @@
1212, setuptoolsBuildHook
1313 }:
1414
15−assert (!blas.is64bit) && (!lapack.is64bit);
15+assert (!blas.isILP64) && (!lapack.isILP64);
1616
1717let
1818 cfg = writeTextFile {
1919 name = "site.cfg";
2020 text = (lib.generators.toINI {} {
2121 ${blas.implementation} = {
22− include_dirs = "${blas}/include:${lapack}/include";
22+ include_dirs = "${lib.getDev blas}/include:${lib.getDev lapack}/include";
2323 library_dirs = "${blas}/lib:${lapack}/lib";
24− } // lib.optionalAttrs (blas.implementation == "mkl") {
25− mkl_libs = "mkl_rt";
26− lapack_libs = "";
24+ libraries = "lapack,lapacke,blas,cblas";
2725 };
2826 });
2927 };
pkgs/tools/misc/hpl/default.nix+1−1
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, blas, lapack, mpi } :
22
3−assert (!blas.is64bit) && (!lapack.is64bit);
3+assert (!blas.isILP64) && (!lapack.isILP64);
44
55stdenv.mkDerivation rec {
66 pname = "hpl";
pkgs/top-level/release-alternatives.nix+3−3
@@ -59,7 +59,7 @@ in
5959{
6060 blas = mapListToAttrs supportedSystems (system': let system = lib.systems.elaborate { system = system'; };
6161 in mapListToAttrs (blasProviders system) (provider: let
62− is64bit = builtins.elem provider (["mkl64"] ++ lib.optional system.is64bit "openblas");
62+ isILP64 = builtins.elem provider (["mkl64"] ++ lib.optional system.is64bit "openblas");
6363 pkgs = pkgsFun {
6464 config = { inherit allowUnfree; };
6565 system = system';
@@ -68,13 +68,13 @@ in
6868 lapackProvider = if provider == "mkl64"
6969 then super.mkl
7070 else builtins.getAttr provider super;
71− inherit is64bit;
71+ inherit isILP64;
7272 };
7373 blas = super.blas.override {
7474 blasProvider = if provider == "mkl64"
7575 then super.mkl
7676 else builtins.getAttr provider super;
77− inherit is64bit;
77+ inherit isILP64;
7878 };
7979 })];
8080 };