forked from Nix-QChem/NixOS-QChem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nixpkgs-opt.nix
72 lines (59 loc) · 1.64 KB
/
nixpkgs-opt.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
self: super:
{
#
# Package set with optimized upstream libraries
#
# Compile fftw with full AVX features
fftw = super.fftw.overrideAttrs ( oldAttrs: {
configureFlags = oldAttrs.configureFlags
++ [
"--enable-avx"
"--enable-avx2"
"--enable-fma"
"--enable-avx-128-fma"
];
buildInputs = oldAttrs.buildInputs ++ [ self.gfortran ];
});
fftw-mpi = self.fftw.overrideAttrs ( oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [
self.mpi
];
configureFlags = with super.lib.lists; oldAttrs.configureFlags ++ [
"--enable-mpi"
"MPICC=${self.mpi}/bin/mpicc"
"MPIFC=${self.mpi}/bin/mpif90"
"MPIF90=${self.mpi}/bin/mpif90"
];
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ self.mpi ];
});
fftwSinglePrec = self.fftw.override { precision = "single"; };
libxsmm = super.libxsmm.overrideAttrs ( x: {
makeFlags = x.makeFlags ++ [ "OPT=3" "AVX=2" ];
});
scalapack = super.scalapack.overrideAttrs ( x: {
CFLAGS = "-O3 -mavx2 -mavx -msse2";
FFLAGS = "-O3 -mavx2 -mavx -msse2";
});
gromacs = super.gromacs.override {
cpuAcceleration = "AVX2_256";
singlePrec = true;
fftw = self.fftwSinglePrec;
};
gromacsMpi = super.gromacs.override {
cpuAcceleration = "AVX2_256";
singlePrec = true;
mpiEnabled = true;
fftw = self.fftwSinglePrec;
};
gromacsDouble = super.gromacs.override {
cpuAcceleration = "AVX2_256";
singlePrec = false;
fftw = self.fftw;
};
gromacsDoubleMpi = super.gromacs.override {
cpuAcceleration = "AVX2_256";
singlePrec = false;
mpiEnabled = true;
fftw = self.fftw;
};
}