diff options
Diffstat (limited to 'pkgs/development/libraries/science')
3 files changed, 25 insertions, 11 deletions
diff --git a/pkgs/development/libraries/science/math/mkl/default.nix b/pkgs/development/libraries/science/math/mkl/default.nix index 604413c96d8..82109b4ba34 100644 --- a/pkgs/development/libraries/science/math/mkl/default.nix +++ b/pkgs/development/libraries/science/math/mkl/default.nix @@ -7,17 +7,18 @@ let # Release notes and download URLs are here: # https://registrationcenter.intel.com/en/products/ version = "${year}.${spot}.${rel}"; - year = "2019"; # Darwin is pinned to 2019.3 because the DMG does not unpack; see here for details: # https://github.com/matthewbauer/undmg/issues/4 - spot = if stdenvNoCC.isDarwin then "3" else "5"; - rel = if stdenvNoCC.isDarwin then "199" else "281"; + year = if stdenvNoCC.isDarwin then "2019" else "2020"; + spot = if stdenvNoCC.isDarwin then "3" else "0"; + rel = if stdenvNoCC.isDarwin then "199" else "166"; rpm-ver = "${year}.${spot}-${rel}-${year}.${spot}-${rel}"; # Intel openmp uses its own versioning, but shares the spot release patch. - openmp-ver = "19.0.${spot}-${rel}-19.0.${spot}-${rel}"; + openmp = if stdenvNoCC.isDarwin then "19.0" else "19.1"; + openmp-ver = "${openmp}.${spot}-${rel}-${openmp}.${spot}-${rel}"; in stdenvNoCC.mkDerivation { pname = "mkl"; @@ -31,8 +32,8 @@ in stdenvNoCC.mkDerivation { }) else (fetchurl { - url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15816/l_mkl_${version}.tgz"; - sha256 = "0zkk4rrq7g44acxaxhpd2053r66w169mww6917an0lxhd52fm5cr"; + url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16318/l_mkl_${version}.tgz"; + sha256 = "1q4ab87qzraksn8mm4117vj7l3sgpdi2qszj7nx122zi7zmjvngn"; }); nativeBuildInputs = if stdenvNoCC.isDarwin @@ -136,7 +137,7 @@ in stdenvNoCC.mkDerivation { choice of compilers, languages, operating systems, and linking and threading models. ''; - homepage = https://software.intel.com/en-us/mkl; + homepage = "https://software.intel.com/en-us/mkl"; license = licenses.issl; platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = with maintainers; [ bhipple ]; diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 38ad31cc625..efad842bd35 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -3,6 +3,14 @@ # pointer width, but some expect to use 32-bit integers always # (for compatibility with reference BLAS). , blas64 ? null +# Multi-threaded applications must not call a threaded OpenBLAS +# (the only exception is when an application uses OpenMP as its +# *only* form of multi-threading). See +# https://github.com/xianyi/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded +# https://github.com/xianyi/OpenBLAS/issues/2543 +# This flag builds a single-threaded OpenBLAS using the flags +# stated in thre. +, singleThreaded ? false , buildPackages # Select a specific optimization target (other than the default) # See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt @@ -146,7 +154,12 @@ stdenv.mkDerivation rec { NO_BINARY_MODE = if stdenv.isx86_64 then toString (stdenv.hostPlatform != stdenv.buildPlatform) else stdenv.hostPlatform != stdenv.buildPlatform; - }); + } // (stdenv.lib.optionalAttrs singleThreaded { + # As described on https://github.com/xianyi/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded + USE_THREAD = false; + USE_LOCKING = true; # available with openblas >= 0.3.7 + USE_OPENMP = false; # openblas will refuse building with both USE_OPENMP=1 and USE_THREAD=0 + })); doCheck = true; checkTarget = "tests"; diff --git a/pkgs/development/libraries/science/math/petsc/default.nix b/pkgs/development/libraries/science/math/petsc/default.nix index 492ad63f27b..911f0a1cf89 100644 --- a/pkgs/development/libraries/science/math/petsc/default.nix +++ b/pkgs/development/libraries/science/math/petsc/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "petsc"; - version = "3.12.4"; + version = "3.13.0"; src = fetchurl { url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz"; - sha256 = "1hw4f12v2xwrs37gjh83dbixhg0yxandqx7s7k5vlfx91l9l3aan"; + sha256 = "0943bydmsq3sjwj3rxhb8hx58b1fm8vymny731557fs10g5zfbyz"; }; nativeBuildInputs = [ blas gfortran.cc.lib liblapack python ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { configureFlagsArray=( $configureFlagsArray "--CC=$CC" - "--with-cxx=g++" + "--with-cxx=$CXX" "--with-fc=0" "--with-mpi=0" "--with-blas-lib=[${blas}/lib/libblas.a,${gfortran.cc.lib}/lib/libgfortran.a]" |