nixpkgs/pkgs/top-level
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
..
aliases.nix blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider 2020-04-17 16:23:55 -05:00
all-packages.nix blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider 2020-04-17 16:23:55 -05:00
beam-packages.nix lfe: 1.2.1 -> 1.3 2020-02-10 20:03:47 +01:00
config.nix
coq-packages.nix coq_8_11: 8.11.0 → 8.11.1 2020-04-05 15:32:32 +02:00
darwin-packages.nix xcode: Add more hashes, and fix some old ones 2020-01-03 15:19:08 -05:00
default.nix
dhall-packages.nix Add Nixpkgs support for Dhall 2020-02-11 22:02:53 -08:00
dotnet-packages.nix treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
emacs-packages.nix
emscripten-packages.nix Fix package metadata like version and homepage 2019-11-07 17:20:33 +01:00
haskell-packages.nix ghcHEAD: bump to 8.11.20200403 (#84217) 2020-04-17 20:50:48 +02:00
haxe-packages.nix
impure.nix Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752) 2019-11-03 20:38:35 -05:00
java-packages.nix
lua-packages.nix treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
make-tarball.nix nix-daemon.nix: Add option nix.registry 2020-04-02 19:38:00 +02:00
metrics.nix
ocaml-packages.nix ocamlPackages.ounit2: init at 2.2.2 2020-04-15 15:01:36 +02:00
packages-config.nix Add packages.json to the tarball job 2020-03-24 16:42:00 +01:00
perl-packages.nix treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
php-packages.nix Merge pull request #85226 from etu/update-phpstan 2020-04-14 16:39:56 +02:00
pure-packages.nix octaveHg: drop 2020-02-09 19:24:18 +01:00
python-packages.nix pythonPackages.pagelabels: init at 1.2.0 2020-04-17 21:01:17 +02:00
release-cross.nix Merge branch 'ghcjs-cross-without-cc-19.09' into ghcjs-cross-without-cc 2019-12-24 17:55:35 -05:00
release-lib.nix
release-python.nix
release-small.nix blas/lapack: add wrapper for “alternative”s of BLAS/LAPACK provider 2020-04-17 16:23:55 -05:00
release.nix Revert "make-tarball.nix: Restore the 'commit' field in packages.json" 2020-03-29 20:57:50 +02:00
ruby-packages.nix rubyPackages: update 2020-02-09 09:18:47 +01:00
splice.nix
stage.nix symlinkJoin: fix cross 2019-12-25 12:17:09 -05:00
static.nix pkgsStatic.python3: fix build 2020-03-30 17:06:38 +02:00
unix-tools.nix
wine-packages.nix faudio, wine, vkd3d: add faudio 19.10 and vkd3d 1.1 to wine 2019-10-12 14:57:28 +02:00