Author: simons
Date: Thu Feb 23 11:33:26 2012
New Revision: 32506
URL: https://nixos.org/websvn/nix/?rev=32506&sc=1

Log:
Atlas aborts the build some kind of CPU frequency scaling is detected 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. The build log
might show something such as the following:

 | It appears you have cpu throttling enabled, which makes timings
 | unreliable and an ATLAS install nonsensical.  Aborting.
 | See ATLAS/INSTALL.txt for further information
 | Ignoring CPU throttling by user override!

Modified:
   nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: 
nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix     
Thu Feb 23 11:27:47 2012        (r32505)
+++ nixpkgs/trunk/pkgs/development/libraries/science/math/atlas/default.nix     
Thu Feb 23 11:33:26 2012        (r32506)
@@ -1,27 +1,46 @@
-{ stdenv, fetchurl, gfortran }:
+{ stdenv, fetchurl, gfortran, tolerateCpuTimingInaccuracy ? true }:
+
+let
+  optionalString = stdenv.lib.optionalString;
+in
 
 stdenv.mkDerivation {
   name = "atlas-3.9.67";
-  
+
   src = fetchurl {
     url = mirror://sf/math-atlas/atlas3.9.67.tar.bz2;
     sha256 = "06xxlv440z8a3qmfrh17p28girv71c6awvpw5vhpspr0pcsgk1pa";
   };
 
-  # configure outside of the source directory
+  # Configure outside of the source directory.
   preConfigure = '' mkdir build; cd build; configureScript=../configure; '';
 
-  # the manual says you should pass -fPIC as configure arg .. It works
-  configureFlags = "-Fa alg -fPIC" + 
-    (if stdenv.isi686 then " -b 32" else "");
+  # * The manual says you should pass -fPIC as configure arg. Not sure why, but
+  #   it works.
+  #
+  # * 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"
+    + optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0";
 
   buildInputs = [ gfortran ];
 
   doCheck = true;
 
   meta = {
-    description = "Atlas library";
+    homepage = "http://math-atlas.sourceforge.net/";;
+    description = "Automatically Tuned Linear Algebra Software (ATLAS)";
     license = "GPL";
-    homepage = http://math-atlas.sourceforge.net/;
+
+    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.
+    '';
   };
 }

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Feb 23 11:27:47 
2012        (r32505)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Thu Feb 23 11:33:26 
2012        (r32506)
@@ -8296,7 +8296,13 @@
 
   ### SCIENCE/MATH
 
-  atlas = callPackage ../development/libraries/science/math/atlas { };
+  atlas = callPackage ../development/libraries/science/math/atlas {
+    # The build process measures CPU capabilities and optimizes the
+    # library to perform best on that particular machine. That is a
+    # great feature, but it's of limited use with pre-built binaries
+    # coming from a central build farm.
+    tolerateCpuTimingInaccuracy = true;
+  };
 
   blas = callPackage ../development/libraries/science/math/blas { };
 
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to