mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
Merge pull request #143361 from sheepforce/gromacs
gromacs: 2020.4 -> 2021.3, cuda, mpi cleanups, performance tunings
This commit is contained in:
commit
21f73171e8
@ -1,13 +1,8 @@
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, cmake
|
||||
, hwloc
|
||||
, fftw
|
||||
, perl
|
||||
, singlePrec ? true
|
||||
, mpiEnabled ? false
|
||||
, mpi
|
||||
, cpuAcceleration ? null
|
||||
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit,
|
||||
singlePrec ? true,
|
||||
enableMpi ? false,
|
||||
enableCuda ? false,
|
||||
cpuAcceleration ? null
|
||||
}:
|
||||
|
||||
let
|
||||
@ -24,20 +19,32 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "gromacs";
|
||||
version = "2020.4";
|
||||
version = "2021.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.gromacs.org/pub/gromacs/gromacs-${version}.tar.gz";
|
||||
sha256 = "1rplvgna60nqyb8nspaz3bfkwb044kv3zxdaa5whql5m441nj6am";
|
||||
sha256 = "4QmFbsREdo373kHzBZ4xI6vbj+Vsozsag/Me1FdaHMY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ fftw perl hwloc ]
|
||||
++ (lib.optionals mpiEnabled [ mpi ]);
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
perl
|
||||
hwloc
|
||||
blas
|
||||
lapack
|
||||
] ++ lib.lists.optional enableMpi mpi
|
||||
++ lib.lists.optional enableCuda cudatoolkit
|
||||
;
|
||||
|
||||
propagatedBuildInputs = lib.lists.optional enableMpi mpi;
|
||||
propagatedUserEnvPkgs = lib.lists.optional enableMpi mpi;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
|
||||
"-DGMX_OPENMP:BOOL=TRUE"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
] ++ (
|
||||
if singlePrec then [
|
||||
"-DGMX_DOUBLE=OFF"
|
||||
@ -46,13 +53,15 @@ in stdenv.mkDerivation rec {
|
||||
"-DGMX_DEFAULT_SUFFIX=OFF"
|
||||
]
|
||||
) ++ (
|
||||
if mpiEnabled then [
|
||||
"-DGMX_MPI:BOOL=TRUE"
|
||||
"-DGMX_THREAD_MPI:BOOL=FALSE"
|
||||
] else [
|
||||
"-DGMX_MPI:BOOL=FALSE"
|
||||
]
|
||||
);
|
||||
if enableMpi
|
||||
then [
|
||||
"-DGMX_MPI:BOOL=TRUE"
|
||||
"-DGMX_THREAD_MPI:BOOL=FALSE"
|
||||
]
|
||||
else [
|
||||
"-DGMX_MPI:BOOL=FALSE"
|
||||
]
|
||||
) ++ lib.lists.optional enableCuda "-DGMX_GPU=CUDA";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.gromacs.org";
|
||||
@ -78,5 +87,6 @@ in stdenv.mkDerivation rec {
|
||||
See: http://www.gromacs.org/About_Gromacs for details.
|
||||
'';
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ sheepforce markuskowa ];
|
||||
};
|
||||
}
|
||||
|
@ -31209,30 +31209,31 @@ with pkgs;
|
||||
|
||||
gromacs = callPackage ../applications/science/molecular-dynamics/gromacs {
|
||||
singlePrec = true;
|
||||
mpiEnabled = false;
|
||||
fftw = fftwSinglePrec;
|
||||
cmake = cmakeCurses;
|
||||
};
|
||||
|
||||
gromacsMpi = lowPrio (gromacs.override {
|
||||
singlePrec = true;
|
||||
mpiEnabled = true;
|
||||
enableMpi = true;
|
||||
fftw = fftwSinglePrec;
|
||||
cmake = cmakeCurses;
|
||||
});
|
||||
|
||||
gromacsDouble = lowPrio (gromacs.override {
|
||||
singlePrec = false;
|
||||
mpiEnabled = false;
|
||||
fftw = fftw;
|
||||
cmake = cmakeCurses;
|
||||
});
|
||||
|
||||
gromacsDoubleMpi = lowPrio (gromacs.override {
|
||||
singlePrec = false;
|
||||
mpiEnabled = true;
|
||||
enableMpi = true;
|
||||
fftw = fftw;
|
||||
cmake = cmakeCurses;
|
||||
});
|
||||
|
||||
gromacsCudaMpi = lowPrio (gromacs.override {
|
||||
singlePrec = true;
|
||||
enableMpi = true;
|
||||
enableCuda = true;
|
||||
fftw = fftwSinglePrec;
|
||||
});
|
||||
|
||||
zegrapher = libsForQt5.callPackage ../applications/science/math/zegrapher { };
|
||||
|
Loading…
Reference in New Issue
Block a user