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/molecular-dynamics | |
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/molecular-dynamics')
-rw-r--r-- | pkgs/applications/science/molecular-dynamics/gromacs/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/science/molecular-dynamics/lammps/default.nix | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index c40faddbbf946..bdec2ccc669f7 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -3,10 +3,10 @@ , cmake , hwloc , fftw -, openmpi , perl , singlePrec ? true , mpiEnabled ? false +, mpi , cpuAcceleration ? null }: @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ fftw perl hwloc ] - ++ (lib.optionals mpiEnabled [ openmpi ]); + ++ (lib.optionals mpiEnabled [ mpi ]); cmakeFlags = [ "-DGMX_SIMD:STRING=${SIMD cpuAcceleration}" diff --git a/pkgs/applications/science/molecular-dynamics/lammps/default.nix b/pkgs/applications/science/molecular-dynamics/lammps/default.nix index 123afef03e86a..51ce64115ea56 100644 --- a/pkgs/applications/science/molecular-dynamics/lammps/default.nix +++ b/pkgs/applications/science/molecular-dynamics/lammps/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchFromGitHub , libpng, gzip, fftw, blas, lapack -, mpi ? null +, withMPI ? false +, mpi }: let packages = [ "asphere" "body" "class2" "colloid" "compress" "coreshell" @@ -8,7 +9,6 @@ let packages = [ "opt" "peri" "qeq" "replica" "rigid" "shock" "snap" "srd" "user-reaxc" ]; lammps_includes = "-DLAMMPS_EXCEPTIONS -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64"; - withMPI = (mpi != null); in stdenv.mkDerivation rec { # LAMMPS has weird versioning converted to ISO 8601 format |