2012-04-05 14:18:08 +02:00
|
|
|
{ stdenv, fetchurl, gfortran, tolerateCpuTimingInaccuracy ? true, shared ? false }:
|
2012-02-23 12:33:26 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
optionalString = stdenv.lib.optionalString;
|
|
|
|
in
|
2008-10-05 11:01:59 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-02-21 15:49:36 +01:00
|
|
|
name = "atlas-3.9.67";
|
2012-02-23 12:33:26 +01:00
|
|
|
|
2008-10-05 11:01:59 +02:00
|
|
|
src = fetchurl {
|
2012-02-21 15:49:36 +01:00
|
|
|
url = mirror://sf/math-atlas/atlas3.9.67.tar.bz2;
|
|
|
|
sha256 = "06xxlv440z8a3qmfrh17p28girv71c6awvpw5vhpspr0pcsgk1pa";
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
|
2012-02-23 12:33:26 +01:00
|
|
|
# Configure outside of the source directory.
|
2008-12-02 23:55:33 +01:00
|
|
|
preConfigure = '' mkdir build; cd build; configureScript=../configure; '';
|
|
|
|
|
2012-04-13 20:46:24 +02:00
|
|
|
# * -fPIC allows to build atlas inside shared objects, as octave does.
|
2012-02-23 12:33:26 +01:00
|
|
|
#
|
|
|
|
# * Atlas aborts the build if it detects that some kind of CPU frequency
|
|
|
|
# scaling is active on the build machine because that feature offsets the
|
|
|
|
# performance timings. We ignore that check, however, because with binaries
|
|
|
|
# being pre-built on Hydra those timings aren't accurate for the local
|
|
|
|
# machine in the first place.
|
2012-04-13 20:46:24 +02:00
|
|
|
# * Atlas detects the cpu and does some tricks. For example, notices the
|
|
|
|
# hydra AMD Family 10h computer, and uses a SSE trick for it (bit 17 of MXCSR)
|
|
|
|
# available, for what I know, only in that family. So we hardcode K7
|
|
|
|
# -A 31 = Athlon K7
|
|
|
|
# -A 18 = Pentium II
|
|
|
|
# -V 192 = SSE1|SSE2 (Or it takes SSE3 somehow in my machine without SSE3)
|
2012-04-15 00:00:12 +02:00
|
|
|
# -V 0 = No SIMD (Pentium II does not have any SSE)
|
2012-04-13 20:46:24 +02:00
|
|
|
# -t 0 = No threading
|
2012-04-15 10:11:12 +02:00
|
|
|
configureFlags = "-Fa alg -fPIC -t 0"
|
2012-04-15 00:00:12 +02:00
|
|
|
+ optionalString stdenv.isi686 " -b 32 -A 18 -V 0"
|
2012-04-14 20:58:30 +02:00
|
|
|
+ optionalString stdenv.isx86_64 " -A 31 -V 192"
|
2012-04-05 14:18:08 +02:00
|
|
|
+ optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0"
|
|
|
|
+ optionalString shared " --shared "
|
|
|
|
;
|
2008-12-02 23:55:33 +01:00
|
|
|
|
2010-07-28 13:55:54 +02:00
|
|
|
buildInputs = [ gfortran ];
|
2008-10-05 11:01:59 +02:00
|
|
|
|
2012-02-22 23:40:35 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2008-10-05 11:01:59 +02:00
|
|
|
meta = {
|
2012-02-23 12:33:26 +01:00
|
|
|
homepage = "http://math-atlas.sourceforge.net/";
|
|
|
|
description = "Automatically Tuned Linear Algebra Software (ATLAS)";
|
2010-07-28 13:55:54 +02:00
|
|
|
license = "GPL";
|
2012-02-23 12:33:26 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The ATLAS (Automatically Tuned Linear Algebra Software) project is an ongoing
|
|
|
|
research effort focusing on applying empirical techniques in order to provide
|
|
|
|
portable performance. At present, it provides C and Fortran77 interfaces to a
|
|
|
|
portably efficient BLAS implementation, as well as a few routines from LAPACK.
|
|
|
|
'';
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
}
|