default.nix 2.35 KB
Newer Older
Valentin Reis's avatar
.  
Valentin Reis committed
1
{
Valentin Reis's avatar
Valentin Reis committed
2
  hostNixpkgs ? <nixpkgs>,
Valentin Reis's avatar
Valentin Reis committed
3
  pkgs         ? import ../pin.nix {
Valentin Reis's avatar
Valentin Reis committed
4
    hostPkgs = import hostNixpkgs {};
Valentin Reis's avatar
Valentin Reis committed
5 6 7
    jsonpath =../nixpkgs-18.03.json;
  },
  datamovepkgs ? import ../pin.nix {
Valentin Reis's avatar
Valentin Reis committed
8
    hostPkgs = import hostNixpkgs {};
Valentin Reis's avatar
Valentin Reis committed
9 10
    jsonpath=../datamove.json;
  },
Valentin Reis's avatar
Valentin Reis committed
11
  packagepins ? import ./pins.nix {inherit (pkgs) stdenv fetchgit fetchgitPrivate;}
Valentin Reis's avatar
.  
Valentin Reis committed
12 13
}:
let
Valentin Reis's avatar
Valentin Reis committed
14
  gitpin = f: pkgs.fetchgit {inherit (pkgs.lib.importJSON f) url sha256 rev fetchSubmodules;};
Valentin Reis's avatar
Valentin Reis committed
15
  compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux";
Valentin Reis's avatar
.  
Valentin Reis committed
16
  callPackage = pkgs.lib.callPackageWith pkgs;
Valentin Reis's avatar
Valentin Reis committed
17
  callPackagePinWith =
Valentin Reis's avatar
Valentin Reis committed
18
  { folderPath
Valentin Reis's avatar
Valentin Reis committed
19 20
  , nixName ? "default"
  , jsonName ? nixName
Valentin Reis's avatar
Valentin Reis committed
21 22
  , depset ? {}
  } :
Valentin Reis's avatar
Valentin Reis committed
23
  let
Valentin Reis's avatar
Valentin Reis committed
24 25 26
    nixPath = folderPath + "/${nixName}.nix";
    jsonPath = folderPath + "/${jsonName}.json";
    src = gitpin jsonPath;
Valentin Reis's avatar
Valentin Reis committed
27
  in
Valentin Reis's avatar
Valentin Reis committed
28 29 30 31
  callPackage nixPath (depset // {inherit src;});

  cpDefaultPin = folderPath: depset: callPackagePinWith { inherit folderPath depset;};
  cpAlternatePin = folderPath: depset: jsonName: callPackagePinWith {inherit folderPath depset jsonName;};
Valentin Reis's avatar
Valentin Reis committed
32
  pythonPackages = pkgs.python27Packages;
Valentin Reis's avatar
.  
Valentin Reis committed
33
in rec {
34
  #NRM components
Valentin Reis's avatar
Valentin Reis committed
35

Valentin Reis's avatar
Valentin Reis committed
36
  nodelevel = rec {
Valentin Reis's avatar
Valentin Reis committed
37 38 39 40 41
    libnrm = cpDefaultPin ./libnrm {};
    containers = cpDefaultPin ./containers { inherit pythonPackages; };
    containers-bandit = cpAlternatePin ./containers { inherit pythonPackages; } "bandit";
    nrm = cpDefaultPin ./nrm { inherit pythonPackages; nrm-containers = containers; };
    nrm-bandit = cpAlternatePin ./nrm { inherit pythonPackages; nrm-containers=containers-bandit; } "bandit";
42
  };
Valentin Reis's avatar
Valentin Reis committed
43

44 45
  #Instrumented applications
  applications = rec {
Valentin Reis's avatar
Valentin Reis committed
46 47 48 49 50 51 52 53
    #lammps = pkgs.lammps-mpi;
    amg = cpDefaultPin applications/amg;
    qmcpack = cpDefaultPin applications/qmcpack;
    openmc = cpDefaultPin applications/openmc;
    stream = cpDefaultPin applications/stream;
    lammps = cpDefaultPin applications/lammps;
    graph500 = cpAlternatePin applications/simple {} "graph500";
    simple = cpAlternatePin applications/simple {inherit intel; inherit (nodelevel) libnrm;} "dgemm_randomwalk";
54
  };
Valentin Reis's avatar
Valentin Reis committed
55

56 57
  #Intel compilers
  intel = with pkgs; rec {
58 59
    icc = callPackage intel/icc { inherit compiler_path; };
    mkl = callPackage intel/mkl { inherit compiler_path; };
Valentin Reis's avatar
Valentin Reis committed
60
    WrappedICC = (import intel/cc-wrapper  {
Valentin Reis's avatar
Valentin Reis committed
61 62 63 64 65 66
        inherit stdenv binutils coreutils ;
        libc = glibc;
        nativeTools = false;
        nativeLibc = false;
        cc = icc;
    });
67
  };
Valentin Reis's avatar
renames  
Valentin Reis committed
68
}