diff options
author | markuskowa <markus.kowalewski@gmail.com> | 2024-03-30 11:18:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-30 11:18:07 +0100 |
commit | 248a4a2e8b011251aab4cf746a2393886172ad3a (patch) | |
tree | 7c060b04ca8004c2582e5f98121980da88a02a12 /pkgs/applications/science | |
parent | c5ae08c575999a69af4ea49242db23ea25776284 (diff) | |
parent | 927d6ca7e43eeabfb750ed39a071b0060bb51a50 (diff) |
Merge pull request #299989 from markuskowa/upd-octopus
octopus: 13.0 -> 14.0, fix scalapack
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/chemistry/octopus/default.nix | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/pkgs/applications/science/chemistry/octopus/default.nix b/pkgs/applications/science/chemistry/octopus/default.nix index 93fec7149604b..a3a385802aaaa 100644 --- a/pkgs/applications/science/chemistry/octopus/default.nix +++ b/pkgs/applications/science/chemistry/octopus/default.nix @@ -1,6 +1,9 @@ { lib , stdenv , fetchFromGitLab +, cmake +, pkg-config +, ninja , gfortran , which , perl @@ -14,15 +17,12 @@ , gsl , netcdf , arpack -, autoreconfHook +, spglib +, metis , scalapack , mpi , enableMpi ? true , python3 -, enableFma ? stdenv.hostPlatform.fmaSupport -, enableFma4 ? stdenv.hostPlatform.fma4Support -, enableAvx ? stdenv.hostPlatform.avx2Support -, enableAvx512 ? stdenv.hostPlatform.avx512Support }: assert (!blas.isILP64) && (!lapack.isILP64); @@ -30,21 +30,23 @@ assert (blas.isILP64 == arpack.isILP64); stdenv.mkDerivation rec { pname = "octopus"; - version = "13.0"; + version = "14.0"; src = fetchFromGitLab { owner = "octopus-code"; repo = "octopus"; rev = version; - sha256 = "sha256-CZ+Qmv6aBQ6w11mLvTP6QAJzaGs+vmmXuNGnSyAqVDU="; + sha256 = "sha256-wQ2I+10ZHLKamW3j6AUtq2KZVm6d29+JxYgwvBKz9DU="; }; nativeBuildInputs = [ which perl procps - autoreconfHook + cmake gfortran + pkg-config + ninja ]; buildInputs = [ @@ -57,34 +59,20 @@ stdenv.mkDerivation rec { netcdf arpack libvdwxc + spglib + metis (python3.withPackages (ps: [ ps.pyyaml ])) ] ++ lib.optional enableMpi scalapack; propagatedBuildInputs = lib.optional enableMpi mpi; propagatedUserEnvPkgs = lib.optional enableMpi mpi; - configureFlags = with lib; [ - "--with-yaml-prefix=${lib.getDev libyaml}" - "--with-blas=-lblas" - "--with-lapack=-llapack" - "--with-fftw-prefix=${lib.getDev fftw}" - "--with-gsl-prefix=${lib.getDev gsl}" - "--with-libxc-prefix=${lib.getDev libxc}" - "--with-libvdwxc" - "--enable-openmp" - ] - ++ optional enableFma "--enable-fma3" - ++ optional enableFma4 "--enable-fma4" - ++ optional enableAvx "--enable-avx" - ++ optional enableAvx512 "--enable-avx512" - ++ optionals enableMpi [ - "--enable-mpi" - "--with-scalapack=-lscalapack" - "CC=mpicc" - "FC=mpif90" + cmakeFlags = [ + (lib.cmakeBool "OCTOPUS_MPI" enableMpi) + (lib.cmakeBool "OCTOPUS_ScaLAPACK" enableMpi) + (lib.cmakeBool "OCTOPUS_OpenMP" true) ]; - nativeCheckInputs = lib.optional.enableMpi mpi; doCheck = false; checkTarget = "check-short"; |