openblas_2_14: init at 0.2.14
This commit is contained in:
parent
63cf61e8d3
commit
3e476a73ef
65
pkgs/development/libraries/science/math/openblas/0.2.14.nix
Normal file
65
pkgs/development/libraries/science/math/openblas/0.2.14.nix
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{ stdenv, fetchurl, gfortran, perl, which, config, coreutils
|
||||||
|
# Most packages depending on openblas expect integer width to match pointer width,
|
||||||
|
# but some expect to use 32-bit integers always (for compatibility with reference BLAS).
|
||||||
|
, blas64 ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let blas64_ = blas64; in
|
||||||
|
|
||||||
|
let local = config.openblas.preferLocalBuild or false;
|
||||||
|
binary =
|
||||||
|
{ i686-linux = "32";
|
||||||
|
x86_64-linux = "64";
|
||||||
|
x86_64-darwin = "64";
|
||||||
|
}."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
|
||||||
|
genericFlags =
|
||||||
|
[ "DYNAMIC_ARCH=1"
|
||||||
|
"NUM_THREADS=64"
|
||||||
|
];
|
||||||
|
localFlags = config.openblas.flags or
|
||||||
|
optionals (hasAttr "target" config.openblas) [ "TARGET=${config.openblas.target}" ];
|
||||||
|
blas64 = if blas64_ != null then blas64_ else hasPrefix "x86_64" stdenv.system;
|
||||||
|
|
||||||
|
version = "0.2.14";
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "openblas-${version}";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/xianyi/OpenBLAS/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "2411c4f56f477b42dff54db2b7ffc0b7cf53bb9778d54982595c64cc69c40fc1";
|
||||||
|
name = "openblas-${version}.tar.gz";
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit blas64;
|
||||||
|
|
||||||
|
nativeBuildInputs = optionals stdenv.isDarwin [coreutils] ++ [gfortran perl which];
|
||||||
|
|
||||||
|
makeFlags =
|
||||||
|
(if local then localFlags else genericFlags)
|
||||||
|
++
|
||||||
|
optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"]
|
||||||
|
++
|
||||||
|
[
|
||||||
|
"FC=gfortran"
|
||||||
|
# Note that clang is available through the stdenv on OSX and
|
||||||
|
# thus is not an explicit dependency.
|
||||||
|
"CC=${if stdenv.isDarwin then "clang" else "gcc"}"
|
||||||
|
''PREFIX="''$(out)"''
|
||||||
|
"BINARY=${binary}"
|
||||||
|
"USE_OPENMP=${if stdenv.isDarwin then "0" else "1"}"
|
||||||
|
"INTERFACE64=${if blas64 then "1" else "0"}"
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
checkTarget = "tests";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Basic Linear Algebra Subprograms";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
homepage = "https://github.com/xianyi/OpenBLAS";
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ ttuegel ];
|
||||||
|
};
|
||||||
|
}
|
@ -15029,10 +15029,12 @@ let
|
|||||||
liblbfgs = callPackage ../development/libraries/science/math/liblbfgs { };
|
liblbfgs = callPackage ../development/libraries/science/math/liblbfgs { };
|
||||||
|
|
||||||
openblas = callPackage ../development/libraries/science/math/openblas { };
|
openblas = callPackage ../development/libraries/science/math/openblas { };
|
||||||
|
openblas_2_14 = callPackage ../development/libraries/science/math/openblas/0.2.14.nix { };
|
||||||
|
|
||||||
# A version of OpenBLAS using 32-bit integers on all platforms for compatibility with
|
# A version of OpenBLAS using 32-bit integers on all platforms for compatibility with
|
||||||
# standard BLAS and LAPACK.
|
# standard BLAS and LAPACK.
|
||||||
openblasCompat = openblas.override { blas64 = false; };
|
openblasCompat = openblas.override { blas64 = false; };
|
||||||
|
openblasCompat_2_14 = openblas_2_14.override { blas64 = false; };
|
||||||
|
|
||||||
openlibm = callPackage ../development/libraries/science/math/openlibm {};
|
openlibm = callPackage ../development/libraries/science/math/openlibm {};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user