mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
cp2k: enable plumed plugin
cp2k: enable plumed plugin cp2k: use mpicxx to figure out link lines
This commit is contained in:
parent
c20b4b62b3
commit
09b52c631a
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, fetchFromGitHub, python3, gfortran, blas, lapack
|
||||
, fftw, libint, libvori, libxc, mpi, gsl, scalapack, openssh, makeWrapper
|
||||
, libxsmm, spglib, which, pkg-config
|
||||
, libxsmm, spglib, which, pkg-config, plumed, zlib
|
||||
, enableElpa ? false
|
||||
, elpa
|
||||
} :
|
||||
@ -34,6 +34,8 @@ in stdenv.mkDerivation rec {
|
||||
scalapack
|
||||
blas
|
||||
lapack
|
||||
plumed
|
||||
zlib
|
||||
] ++ lib.optional enableElpa elpa;
|
||||
|
||||
propagatedBuildInputs = [ mpi ];
|
||||
@ -64,7 +66,8 @@ in stdenv.mkDerivation rec {
|
||||
AR = ar -r
|
||||
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \
|
||||
-D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \
|
||||
-D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"}
|
||||
-D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \
|
||||
-D__PLUMED2
|
||||
CFLAGS = -fopenmp
|
||||
FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
|
||||
-ftree-vectorize -funroll-loops -msse2 \
|
||||
@ -77,8 +80,11 @@ in stdenv.mkDerivation rec {
|
||||
-lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \
|
||||
-lint2 -lstdc++ -lvori \
|
||||
-lgomp -lpthread -lm \
|
||||
-fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"}
|
||||
-fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"} \
|
||||
-lz -ldl -lstdc++ ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \
|
||||
-lplumed
|
||||
LDFLAGS = \$(FCFLAGS) \$(LIBS)
|
||||
include ${plumed}/lib/plumed/src/lib/Plumed.inc
|
||||
EOF
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user