mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
Merge pull request #138123 from markuskowa/fix-octopus
octopus: add CPU optimization flags
This commit is contained in:
commit
228e15e7cb
@ -1,6 +1,10 @@
|
|||||||
{ lib, stdenv, fetchFromGitLab, gfortran, perl, procps
|
{ lib, stdenv, fetchFromGitLab, gfortran, perl, procps
|
||||||
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
|
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
|
||||||
, python3
|
, python3
|
||||||
|
, enableFma ? stdenv.hostPlatform.fmaSupport
|
||||||
|
, enableFma4 ? stdenv.hostPlatform.fma4Support
|
||||||
|
, enableAvx ? stdenv.hostPlatform.avx2Support
|
||||||
|
, enableAvx512 ? stdenv.hostPlatform.avx512Support
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||||
@ -35,14 +39,18 @@ stdenv.mkDerivation rec {
|
|||||||
(python3.withPackages (ps: [ ps.pyyaml ]))
|
(python3.withPackages (ps: [ ps.pyyaml ]))
|
||||||
];
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = with lib; [
|
||||||
"--with-yaml-prefix=${libyaml}"
|
"--with-yaml-prefix=${libyaml}"
|
||||||
"--with-blas=-lblas"
|
"--with-blas=-lblas"
|
||||||
"--with-lapack=-llapack"
|
"--with-lapack=-llapack"
|
||||||
"--with-fftw-prefix=${fftw.dev}"
|
"--with-fftw-prefix=${fftw.dev}"
|
||||||
"--with-gsl-prefix=${gsl}"
|
"--with-gsl-prefix=${gsl}"
|
||||||
"--with-libxc-prefix=${libxc}"
|
"--with-libxc-prefix=${libxc}"
|
||||||
];
|
"--enable-openmp"
|
||||||
|
] ++ optional enableFma "--enable-fma3"
|
||||||
|
++ optional enableFma4 "--enable-fma4"
|
||||||
|
++ optional enableAvx "--enable-avx"
|
||||||
|
++ optional enableAvx512 "--enable-avx512";
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
checkTarget = "check-short";
|
checkTarget = "check-short";
|
||||||
|
Loading…
Reference in New Issue
Block a user