mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
atlas: optionally build with full lapack
This commit is contained in:
parent
91657e30ca
commit
3ce76d4dd0
@ -2,6 +2,7 @@
|
|||||||
, cpuConfig ? if stdenv.isi686 then "-b 32 -A 12 -V 1" else "-b 64 -A 14 -V 384"
|
, cpuConfig ? if stdenv.isi686 then "-b 32 -A 12 -V 1" else "-b 64 -A 14 -V 384"
|
||||||
, cacheEdge ? "262144"
|
, cacheEdge ? "262144"
|
||||||
, threads ? "0"
|
, threads ? "0"
|
||||||
|
, liblapack, withLapack
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Atlas detects the CPU and optimizes its build accordingly. This is great when
|
# Atlas detects the CPU and optimizes its build accordingly. This is great when
|
||||||
@ -48,7 +49,7 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "atlas-${version}";
|
name = "atlas-${version}" + optionalString withLapack "-with-lapack";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
|
url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
|
||||||
@ -81,7 +82,8 @@ stdenv.mkDerivation {
|
|||||||
"-fPIC"
|
"-fPIC"
|
||||||
"-t ${threads}"
|
"-t ${threads}"
|
||||||
cpuConfig
|
cpuConfig
|
||||||
] ++ optional shared "--shared";
|
] ++ optional shared "--shared"
|
||||||
|
++ optional withLapack "--with-netlib-lapack-tarfile=${liblapack.src}";
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
if [[ -n "${cacheEdge}" ]]; then
|
if [[ -n "${cacheEdge}" ]]; then
|
||||||
@ -94,8 +96,10 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Avoid name collision with the real lapack (ATLAS only builds a partial
|
# Avoid name collision with the real lapack (ATLAS only builds a partial
|
||||||
# lapack).
|
# lapack unless withLapack = true).
|
||||||
mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
|
if ${if withLapack then "false" else "true"}; then
|
||||||
|
mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -12174,8 +12174,12 @@ let
|
|||||||
# great feature, but it's of limited use with pre-built binaries
|
# great feature, but it's of limited use with pre-built binaries
|
||||||
# coming from a central build farm.
|
# coming from a central build farm.
|
||||||
tolerateCpuTimingInaccuracy = true;
|
tolerateCpuTimingInaccuracy = true;
|
||||||
|
liblapack = liblapack_3_5_0;
|
||||||
|
withLapack = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
atlasWithLapack = atlas.override { withLapack = true; };
|
||||||
|
|
||||||
blas = callPackage ../development/libraries/science/math/blas { };
|
blas = callPackage ../development/libraries/science/math/blas { };
|
||||||
|
|
||||||
content = builderDefsPackage ../applications/science/math/content {
|
content = builderDefsPackage ../applications/science/math/content {
|
||||||
|
Loading…
Reference in New Issue
Block a user