nixpkgs/pkgs/development
Matthew Bauer 43873351ff blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider
This is based on previous work for switching between BLAS and LAPACK
implementation in Debian[1] and Gentoo[2]. The goal is to have one way
to depend on the BLAS/LAPACK libraries that all packages must use. The
attrs “blas” and “lapack” are used to represent a wrapped BLAS/LAPACK
provider. Derivations that don’t care how BLAS and LAPACK are
implemented can just use blas and lapack directly. If you do care what
you get (perhaps for some CPP), you should verify that blas and lapack
match what you expect with an assertion.

The “blas” package collides with the old “blas” reference
implementation. This has been renamed to “blas-reference”. In
addition, “lapack-reference” is also included, corresponding to
“liblapack” from Netlib.org.

Currently, there are 3 providers of the BLAS and LAPACK interfaces:

- lapack-reference: the BLAS/LAPACK implementation maintained by netlib.org
- OpenBLAS: an optimized version of BLAS and LAPACK
- MKL: Intel’s unfree but highly optimized BLAS/LAPACK implementation

By default, the above implementations all use the “LP64” BLAS and
LAPACK ABI. This corresponds to “openblasCompat” and is the safest way
to use BLAS/LAPACK. You may received some benefits from “ILP64” or
8-byte integer BLAS at the expense of breaking compatibility with some
packages.

This can be switched at build time with an override like:

    import <nixpkgs> {
        config.allowUnfree = true;
        overlays = [(self: super: {
          lapack = super.lapack.override {
            lapackProvider = super.lapack-reference;
          };
          blas = super.blas.override {
            blasProvider = super.lapack-reference;
          };
        })];
      }

or, switched at runtime via LD_LIBRARY_PATH like:

    $ LD_LIBRARY_PATH=$(nix-build -E '(with import <nixpkgs> {}).lapack.override { lapackProvider = pkgs.mkl; is64bit = true; })')/lib:$(nix-build -E '(with import <nixpkgs> {}).blas.override { blasProvider = pkgs.mkl; is64bit = true; })')/lib ./your-blas-linked-binary

By default, we use OpenBLAS LP64 also known in Nixpkgs as
openblasCompat.

[1]: https://wiki.debian.org/DebianScience/LinearAlgebraLibraries
[2]: https://wiki.gentoo.org/wiki/Blas-lapack-switch
2020-04-17 16:23:55 -05:00
..
androidndk-pkgs
arduino Merge pull request #84190 from geistesk/platformio-4.3.1 2020-04-17 11:37:07 +01:00
beam-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
bower-modules/generic
chez-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
compilers Merge pull request #85183 from Xe/zig-0.6.0 2020-04-17 15:17:45 -04:00
coq-modules coqPackages.dpdgraph: fix build with OCaml ≥ 4.08 2020-04-13 11:04:26 +02:00
dhall-modules
dotnet-modules/patches
em-modules/generic
go-modules buildGoModule: enable strictDeps 2020-03-18 11:29:29 +00:00
go-packages buildGoPackage: enable strictDeps 2020-03-28 11:46:38 +00:00
guile-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
haskell-modules ghc-8.10.x: add plenty of overrides to fix builds 2020-04-17 22:50:43 +02:00
idris-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
interpreters Merge pull request #85385 from takikawa/racket-enable-useprefix 2020-04-17 13:17:00 +02:00
java-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
libraries blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider 2020-04-17 16:23:55 -05:00
lisp-modules lispPackages: update distinfo 2020-03-15 22:34:16 +01:00
lua-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
misc Merge pull request #84551 from gnprice/pr-stripDebugList 2020-04-14 15:54:52 +02:00
mobile treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
node-packages postcss-cli: init at 7.1.0 2020-04-17 01:17:07 -04:00
ocaml-modules ocamlPackages.erm_xmpp: 0.3+20180112 -> 0.3+20200317 2020-04-16 15:32:44 +02:00
perl-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
pharo treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
pure-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
python-modules pythonPackages.pagelabels: init at 1.2.0 2020-04-17 21:01:17 +02:00
r-modules R: Update CRAN and bioconductor packages 2020-04-08 10:01:19 -04:00
ruby-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
tools flow: 0.122.0 -> 0.123.0 2020-04-17 22:00:54 +02:00
web nodejs-13_x: 13.12.0 -> 13.13.0 2020-04-14 18:00:00 -05:00