Author: viric
Date: Fri Apr 13 18:46:24 2012
New Revision: 33780
URL: https://nixos.org/websvn/nix/?rev=33780&sc=1
Log:
I made atlas build for fixed architectures.
We saw a crash in many computers, in the octave check phase, where octave
crashed.
It was due to atlas being built for AMD Family 10h, which has a special SSE
trick that others computer don't have.
For x86_64, atlas is for K7. And for i686, PII.
Modified:
nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
Modified:
nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
Fri Apr 13 18:09:27 2012 (r33779)
+++ nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
Fri Apr 13 18:46:24 2012 (r33780)
@@ -15,16 +15,23 @@
# Configure outside of the source directory.
preConfigure = '' mkdir build; cd build; configureScript=../configure; '';
- # * The manual says you should pass -fPIC as configure arg. Not sure why, but
- # it works.
+ # * -fPIC allows to build atlas inside shared objects, as octave does.
#
# * 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.
- configureFlags = "-Fa alg -fPIC"
- + optionalString stdenv.isi686 " -b 32"
+ # * 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)
+ # -t 0 = No threading
+ configureFlags = "-Fa alg -fPIC -t 0 -V 192"
+ + optionalString stdenv.isi686 " -b 32 -A 18"
+ + optionalString stdenv.isx86_64 " -A 31"
+ optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0"
+ optionalString shared " --shared "
;
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits