diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2021-01-10 13:40:19 +0100 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2021-01-23 12:15:13 +0100 |
commit | 6dba41fbcb4239a628ac5bdf0035882a679b8648 (patch) | |
tree | a11ed2cef0b00b88ba8e99a8d30f8890aec90781 /pkgs/applications/science/chemistry/siesta | |
parent | f6a583eeece936a1d917de67194fec4b6c74cf1f (diff) |
mpi: use mpi attribute consistently as the default MPI implementations
Use the attribute mpi to provide a system wide default MPI implementation. The default is openmpi (as before). This now allows for overriding the MPI implentation by using the overlay mechanism. Build all packages with mpich instead of the default openmpi can now be achived like this: self: super: { mpi = super.mpich; } All derivations that have been using "mpi ? null" to provide optional building with MPI have been change in the following way to allow for optional builds with MPI: { ... , mpi , useMpi ? false }
Diffstat (limited to 'pkgs/applications/science/chemistry/siesta')
-rw-r--r-- | pkgs/applications/science/chemistry/siesta/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/science/chemistry/siesta/default.nix b/pkgs/applications/science/chemistry/siesta/default.nix index 0df953f710673..02ff4c1ca4404 100644 --- a/pkgs/applications/science/chemistry/siesta/default.nix +++ b/pkgs/applications/science/chemistry/siesta/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchurl -, gfortran, blas, lapack -, mpi ? null, scalapack +, gfortran, blas, lapack, scalapack +, useMpi ? false +, mpi }: stdenv.mkDerivation { @@ -17,7 +18,7 @@ stdenv.mkDerivation { }; buildInputs = [ blas lapack gfortran ] - ++ (lib.optionals (mpi != null) [ mpi scalapack ]); + ++ lib.optionals useMpi [ mpi scalapack ]; enableParallelBuilding = true; @@ -29,7 +30,7 @@ stdenv.mkDerivation { cp gfortran.make arch.make ''; - preBuild = if (mpi != null) then '' + preBuild = if useMpi then '' makeFlagsArray=( CC="mpicc" FC="mpifort" FPPFLAGS="-DMPI" MPI_INTERFACE="libmpi_f90.a" MPI_INCLUDE="." |