Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b72fd987892e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f3cf0f074a16
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 8, 2020

  1. Copy the full SHA
    df907c4 View commit details
  2. Merge pull request #84382 from nh2/openblas-add-singleThreaded-option

    openblas: Add `singleThreaded` option. Off by default.
    nh2 authored Apr 8, 2020
    Copy the full SHA
    f3cf0f0 View commit details
Showing with 14 additions and 1 deletion.
  1. +14 −1 pkgs/development/libraries/science/math/openblas/default.nix
15 changes: 14 additions & 1 deletion pkgs/development/libraries/science/math/openblas/default.nix
Original file line number Diff line number Diff line change
@@ -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";