diff options
author | markuskowa <markus.kowalewski@gmail.com> | 2021-01-23 22:51:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-23 22:51:09 +0100 |
commit | 2f34b4b883932f0ee2c1787e704f3915786e8cca (patch) | |
tree | e24afc69b837f14a0bb4aad2cfd344eba214774b /pkgs/tools | |
parent | 12881a7aa703beb3fbf2b26f8cfd76e9bd67ae6b (diff) | |
parent | 72f96278f73dba04bb73fd3dea0943d21e225cf1 (diff) | |
download | nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar.gz nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar.bz2 nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar.lz nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar.xz nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.tar.zst nixlib-2f34b4b883932f0ee2c1787e704f3915786e8cca.zip |
Merge pull request #108983 from markuskowa/dev-mpi
Use mpi attribute consistently to provide a default MPI implementation
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/hdf5/default.nix | 11 | ||||
-rw-r--r-- | pkgs/tools/misc/hpcg/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/system/ior/default.nix | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 0a5032074c1f..fc7bb635040a 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -5,13 +5,14 @@ , gfortran ? null , zlib ? null , szip ? null -, mpi ? null +, mpiSupport ? false +, mpi , enableShared ? !stdenv.hostPlatform.isStatic }: # cpp and mpi options are mutually exclusive # (--enable-unsupported could be used to force the build) -assert !cpp || mpi == null; +assert !cpp || !mpiSupport; let inherit (lib) optional optionals; in @@ -24,7 +25,7 @@ stdenv.mkDerivation rec { }; passthru = { - mpiSupport = (mpi != null); + inherit mpiSupport; inherit mpi; }; @@ -38,13 +39,13 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [] ++ optional (zlib != null) zlib - ++ optional (mpi != null) mpi; + ++ optional mpiSupport mpi; configureFlags = [] ++ optional cpp "--enable-cxx" ++ optional (gfortran != null) "--enable-fortran" ++ optional (szip != null) "--with-szlib=${szip}" - ++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"] + ++ optionals mpiSupport ["--enable-parallel" "CC=${mpi}/bin/mpicc"] ++ optional enableShared "--enable-shared"; patches = [ diff --git a/pkgs/tools/misc/hpcg/default.nix b/pkgs/tools/misc/hpcg/default.nix index 29799641880c..d6896527ad2a 100644 --- a/pkgs/tools/misc/hpcg/default.nix +++ b/pkgs/tools/misc/hpcg/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openmpi } : +{ lib, stdenv, fetchurl, mpi } : stdenv.mkDerivation rec { pname = "hpcg"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ openmpi ]; + buildInputs = [ mpi ]; makeFlags = [ "arch=Linux_MPI" ]; diff --git a/pkgs/tools/system/ior/default.nix b/pkgs/tools/system/ior/default.nix index 326602e3d4d5..c2616797da38 100644 --- a/pkgs/tools/system/ior/default.nix +++ b/pkgs/tools/system/ior/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, openmpi, perl, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, mpi, perl, autoreconfHook }: stdenv.mkDerivation rec { pname = "ior"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ openmpi perl ]; + buildInputs = [ mpi perl ]; enableParallelBuilding = true; |