|
|
@ -1,30 +1,35 @@ |
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl |
|
|
|
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl |
|
|
|
, openblas, hdf5-cpp, python3, texlive |
|
|
|
, blas-ilp64, hdf5-cpp, python3, texlive |
|
|
|
, armadillo, mpi, globalarrays, openssh |
|
|
|
, armadillo, libxc, makeWrapper |
|
|
|
, makeWrapper |
|
|
|
# Note that the CASPT2 module is broken with MPI |
|
|
|
|
|
|
|
# See https://gitlab.com/Molcas/OpenMolcas/-/issues/169 |
|
|
|
|
|
|
|
, enableMpi ? false |
|
|
|
|
|
|
|
, mpi, globalarrays |
|
|
|
} : |
|
|
|
} : |
|
|
|
|
|
|
|
|
|
|
|
let |
|
|
|
assert blas-ilp64.isILP64; |
|
|
|
version = "21.10"; |
|
|
|
assert lib.elem blas-ilp64.passthru.implementation [ "openblas" "mkl" ]; |
|
|
|
# The tag keeps moving, fix a hash instead |
|
|
|
|
|
|
|
gitLabRev = "117305462bac932106e8e3a0347238b768bcb058"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
python = python3.withPackages (ps : with ps; [ six pyparsing ]); |
|
|
|
let |
|
|
|
|
|
|
|
python = python3.withPackages (ps : with ps; [ six pyparsing numpy h5py ]); |
|
|
|
|
|
|
|
|
|
|
|
in stdenv.mkDerivation { |
|
|
|
in stdenv.mkDerivation { |
|
|
|
pname = "openmolcas"; |
|
|
|
pname = "openmolcas"; |
|
|
|
inherit version; |
|
|
|
version = "22.02"; |
|
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitLab { |
|
|
|
src = fetchFromGitLab { |
|
|
|
owner = "Molcas"; |
|
|
|
owner = "Molcas"; |
|
|
|
repo = "OpenMolcas"; |
|
|
|
repo = "OpenMolcas"; |
|
|
|
rev = gitLabRev; |
|
|
|
# The tag keeps moving, fix a hash instead |
|
|
|
sha256 = "sha256-GMi2dsNBog+TmpmP6fhQcp6Z5Bh2LelV//MqLnvRP5c="; |
|
|
|
rev = "f8df69cf87b241a15ebc82d72a8f9a031a385dd4"; # 2022-02-10 |
|
|
|
|
|
|
|
sha256 = "0p2xj8kgqdk5kb1jv5k77acbiqkbl2sh971jnz9p00cmbh556r6a"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
patches = [ |
|
|
|
patches = [ |
|
|
|
# Required to handle openblas multiple outputs |
|
|
|
# Required to handle openblas multiple outputs |
|
|
|
./openblasPath.patch |
|
|
|
./openblasPath.patch |
|
|
|
|
|
|
|
# Required for MKL builds |
|
|
|
|
|
|
|
./MKL-MPICH.patch |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ |
|
|
|
nativeBuildInputs = [ |
|
|
@ -36,27 +41,35 @@ in stdenv.mkDerivation { |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
buildInputs = [ |
|
|
|
buildInputs = [ |
|
|
|
openblas |
|
|
|
blas-ilp64.passthru.provider |
|
|
|
hdf5-cpp |
|
|
|
hdf5-cpp |
|
|
|
python |
|
|
|
python |
|
|
|
armadillo |
|
|
|
armadillo |
|
|
|
|
|
|
|
libxc |
|
|
|
|
|
|
|
] ++ lib.optionals enableMpi [ |
|
|
|
mpi |
|
|
|
mpi |
|
|
|
globalarrays |
|
|
|
globalarrays |
|
|
|
openssh |
|
|
|
|
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passthru = lib.optionalAttrs enableMpi { inherit mpi; }; |
|
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [ |
|
|
|
cmakeFlags = [ |
|
|
|
"-DOPENMP=ON" |
|
|
|
"-DOPENMP=ON" |
|
|
|
"-DGA=ON" |
|
|
|
|
|
|
|
"-DMPI=ON" |
|
|
|
|
|
|
|
"-DLINALG=OpenBLAS" |
|
|
|
"-DLINALG=OpenBLAS" |
|
|
|
"-DTOOLS=ON" |
|
|
|
"-DTOOLS=ON" |
|
|
|
"-DHDF5=ON" |
|
|
|
"-DHDF5=ON" |
|
|
|
"-DFDE=ON" |
|
|
|
"-DFDE=ON" |
|
|
|
"-DOPENBLASROOT=${openblas.dev}" |
|
|
|
"-DEXTERNAL_LIBXC=${libxc}" |
|
|
|
|
|
|
|
] ++ lib.optionals (blas-ilp64.passthru.implementation == "openblas") [ |
|
|
|
|
|
|
|
"-DOPENBLASROOT=${blas-ilp64.passthru.provider.dev}" "-DLINALG=OpenBLAS" |
|
|
|
|
|
|
|
] ++ lib.optionals (blas-ilp64.passthru.implementation == "mkl") [ |
|
|
|
|
|
|
|
"-DMKLROOT=${blas-ilp64.passthru.provider}" "-DLINALG=MKL" |
|
|
|
|
|
|
|
] ++ lib.optionals enableMpi [ |
|
|
|
|
|
|
|
"-DGA=ON" |
|
|
|
|
|
|
|
"-DMPI=ON" |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
preConfigure = '' |
|
|
|
preConfigure = lib.optionalString enableMpi '' |
|
|
|
export GAROOT=${globalarrays}; |
|
|
|
export GAROOT=${globalarrays}; |
|
|
|
''; |
|
|
|
''; |
|
|
|
|
|
|
|
|
|
|
@ -68,6 +81,8 @@ in stdenv.mkDerivation { |
|
|
|
|
|
|
|
|
|
|
|
postInstall = '' |
|
|
|
postInstall = '' |
|
|
|
mv $out/pymolcas $out/bin |
|
|
|
mv $out/pymolcas $out/bin |
|
|
|
|
|
|
|
find $out/Tools -type f -exec mv \{} $out/bin \; |
|
|
|
|
|
|
|
rm -r $out/Tools |
|
|
|
''; |
|
|
|
''; |
|
|
|
|
|
|
|
|
|
|
|
postFixup = '' |
|
|
|
postFixup = '' |
|
|
@ -84,6 +99,7 @@ in stdenv.mkDerivation { |
|
|
|
maintainers = [ maintainers.markuskowa ]; |
|
|
|
maintainers = [ maintainers.markuskowa ]; |
|
|
|
license = licenses.lgpl21Only; |
|
|
|
license = licenses.lgpl21Only; |
|
|
|
platforms = [ "x86_64-linux" ]; |
|
|
|
platforms = [ "x86_64-linux" ]; |
|
|
|
|
|
|
|
mainProgram = "pymolcas"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|