From 14f3b8e6cc92fea319e6d5fc72953e7bae518b38 Mon Sep 17 00:00:00 2001 From: "Bruno Bzeznik Bruno.Bzeznik@imag.fr" Date: Wed, 24 Feb 2016 10:34:22 +0100 Subject: [PATCH] gromacs: 4.6.5 -> 4.6.7 + MPI support --- .../molecular-dynamics/gromacs/default.nix | 18 +++++++++++++----- pkgs/top-level/all-packages.nix | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix index 43ef4337d573..5724db9f3069 100644 --- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix +++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix @@ -1,22 +1,30 @@ { stdenv, fetchurl, cmake, singlePrec ? true, - fftw + mpiEnabled ? false, + fftw, + openmpi }: stdenv.mkDerivation { - name = "gromacs-4.6.5"; + name = "gromacs-4.6.7"; src = fetchurl { - url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.5.tar.gz"; - sha256 = "02ggrplh8fppqib86y3rfk4qm08yddlrb1yjgzl138b3b4qjy957"; + url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.7.tar.gz"; + sha256 = "6afb1837e363192043de34b188ca3cf83db6bd189601f2001a1fc5b0b2a214d9"; }; - buildInputs = [cmake fftw]; + buildInputs = [cmake fftw] + ++ (stdenv.lib.optionals mpiEnabled [ openmpi ]); cmakeFlags = '' ${if singlePrec then "-DGMX_DOUBLE=OFF" else "-DGMX_DOUBLE=ON -DGMX_DEFAULT_SUFFIX=OFF"} + ${if mpiEnabled then "-DGMX_MPI:BOOL=TRUE + -DGMX_CPU_ACCELERATION:STRING=SSE4.1 + -DGMX_OPENMP:BOOL=TRUE + -DGMX_THREAD_MPI:BOOL=FALSE" + else "-DGMX_MPI:BOOL=FALSE" } ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df56303c7742..cb03da1b65d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15085,12 +15085,28 @@ let gromacs = callPackage ../applications/science/molecular-dynamics/gromacs { singlePrec = true; + mpiEnabled = false; fftw = fftwSinglePrec; cmake = cmakeCurses; }; + gromacsMpi = lowPrio (callPackage ../applications/science/molecular-dynamics/gromacs { + singlePrec = true; + mpiEnabled = true; + fftw = fftwSinglePrec; + cmake = cmakeCurses; + }); + gromacsDouble = lowPrio (callPackage ../applications/science/molecular-dynamics/gromacs { singlePrec = false; + mpiEnabled = false; + fftw = fftw; + cmake = cmakeCurses; + }); + + gromacsDoubleMpi = lowPrio (callPackage ../applications/science/molecular-dynamics/gromacs { + singlePrec = false; + mpiEnabled = true; fftw = fftw; cmake = cmakeCurses; });