summary refs log tree commit diff
path: root/pkgs/development/libraries/globalarrays/default.nix
blob: 9cb5dda507d22209aadcd103168194ea121a815e (plain) (blame)
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
{ stdenv, fetchpatch, fetchFromGitHub, autoreconfHook
, openblas, gfortran, openssh, openmpi
} :

let
  version = "5.7";

in stdenv.mkDerivation {
  pname = "globalarrays";
  inherit version;

  src = fetchFromGitHub {
    owner = "GlobalArrays";
    repo = "ga";
    rev = "v${version}";
    sha256 = "07i2idaas7pq3in5mdqq5ndvxln5q87nyfgk3vzw85r72c4fq5jh";
  };

  # upstream patches for openmpi-4 compatibility
  patches = [ (fetchpatch {
    name = "MPI_Type_struct-was-deprecated-in-MPI-2";
    url = "https://github.com/GlobalArrays/ga/commit/36e6458993b1df745f43b7db86dc17087758e0d2.patch";
    sha256 = "058qi8x0ananqx980p03yxpyn41cnmm0ifwsl50qp6sc0bnbnclh";
  })
  (fetchpatch {
    name = "MPI_Errhandler_set-was-deprecated-in-MPI-2";
    url = "https://github.com/GlobalArrays/ga/commit/f1ea5203d2672c1a1d0275a012fb7c2fb3d033d8.patch";
    sha256 = "06n7ds9alk5xa6hd7waw3wrg88yx2azhdkn3cjs2k189iw8a7fqk";
  })];

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ openmpi openblas gfortran openssh ];

  preConfigure = ''
    configureFlagsArray+=( "--enable-i8" \
                           "--with-mpi" \
                           "--with-mpi3" \
                           "--enable-eispack" \
                           "--enable-underscoring" \
                           "--with-blas8=${openblas}/lib -lopenblas" )
  '';

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "Global Arrays Programming Models";
    homepage = http://hpc.pnl.gov/globalarrays/;
    maintainers = [ maintainers.markuskowa ];
    license = licenses.bsd3;
    platforms = platforms.linux;
  };
}