gromacs: drop cudatoolkit.run
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, cmake
|
||||
, hwloc
|
||||
, fftw
|
||||
, perl
|
||||
, blas
|
||||
, lapack
|
||||
, mpi
|
||||
, cudaPackages
|
||||
, plumed
|
||||
, singlePrec ? true
|
||||
, config
|
||||
@@ -9,6 +19,8 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (cudaPackages.cudaFlags) cudaCapabilities dropDot;
|
||||
|
||||
# Select reasonable defaults for all major platforms
|
||||
# The possible values are defined in CMakeLists.txt:
|
||||
# AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256
|
||||
@@ -52,7 +64,7 @@ in stdenv.mkDerivation rec {
|
||||
nativeBuildInputs =
|
||||
[ cmake ]
|
||||
++ lib.optional enablePlumed plumed
|
||||
;
|
||||
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
@@ -61,13 +73,17 @@ in stdenv.mkDerivation rec {
|
||||
blas
|
||||
lapack
|
||||
] ++ lib.optional enableMpi mpi
|
||||
++ lib.optional enableCuda cudatoolkit
|
||||
;
|
||||
++ lib.optionals enableCuda [
|
||||
cudaPackages.cuda_cudart
|
||||
cudaPackages.libcufft
|
||||
cudaPackages.cuda_profiler_api
|
||||
];
|
||||
|
||||
propagatedBuildInputs = lib.optional enableMpi mpi;
|
||||
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "GMX_HWLOC" true)
|
||||
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
|
||||
"-DGMX_OPENMP:BOOL=TRUE"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
@@ -87,7 +103,13 @@ in stdenv.mkDerivation rec {
|
||||
else [
|
||||
"-DGMX_MPI:BOOL=FALSE"
|
||||
]
|
||||
) ++ lib.optional enableCuda "-DGMX_GPU=CUDA";
|
||||
) ++ lib.optionals enableCuda [
|
||||
"-DGMX_GPU=CUDA"
|
||||
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
|
||||
|
||||
# Gromacs seems to ignore and override the normal variables, so we add this ad hoc:
|
||||
(lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput share/cmake $dev
|
||||
|
||||
@@ -22,12 +22,13 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
# XXX: libX11 is not directly needed, but needed as a propagated dep of Cairo.
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
|
||||
|
||||
buildInputs = [ expat ncurses ]
|
||||
++ lib.optionals x11Support [ cairo libX11 ]
|
||||
++ lib.optionals stdenv.isLinux [ numactl ]
|
||||
++ lib.optional enableCuda cudaPackages.cudatoolkit;
|
||||
++ lib.optionals enableCuda [ cudaPackages.cuda_cudart ];
|
||||
|
||||
# Since `libpci' appears in `hwloc.pc', it must be propagated.
|
||||
propagatedBuildInputs = lib.optional stdenv.isLinux pciutils;
|
||||
|
||||
@@ -39447,7 +39447,6 @@ with pkgs;
|
||||
singlePrec = true;
|
||||
enableMpi = true;
|
||||
enableCuda = true;
|
||||
cudatoolkit = cudatoolkit_11;
|
||||
fftw = fftwSinglePrec;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user