bscpkgs/overlay.nix

444 lines
13 KiB
Nix
Raw Normal View History

2020-09-16 12:22:55 +02:00
self: /* Future last stage */
super: /* Previous stage */
with self.lib;
2020-09-16 12:22:55 +02:00
let
inherit (self.lib) callPackageWith;
inherit (self.lib) callPackagesWith;
2020-10-09 16:32:28 +02:00
callPackage = callPackageWith (self // self.bsc // self.garlic);
2020-09-16 12:22:55 +02:00
2020-09-21 14:34:08 +02:00
# --------------------------------------------------------- #
# BSC Packages
# --------------------------------------------------------- #
_bsc = makeExtensible (bsc: {
2020-09-16 12:22:55 +02:00
# Default MPI implementation to use. Will be overwritten by the
# experiments.
mpi = bsc.impi;
2020-09-16 12:22:55 +02:00
perf = callPackage ./bsc/perf/default.nix {
kernel = self.linuxPackages_4_9.kernel;
systemtap = self.linuxPackages_4_9.systemtap;
};
# ParaStation MPI
pscom = callPackage ./bsc/parastation/pscom.nix { };
psmpi = callPackage ./bsc/parastation/psmpi.nix { };
osumb = callPackage ./bsc/osu/default.nix { };
mpich = callPackage ./bsc/mpich/default.nix { };
mpichDebug = bsc.mpich.override { enableDebug = true; };
2020-09-16 12:22:55 +02:00
2020-09-28 13:01:31 +02:00
# Updated version of libpsm2: TODO push upstream.
#libpsm2 = callPackage ./bsc/libpsm2/default.nix { };
2020-09-16 12:22:55 +02:00
# Default Intel MPI version is 2019 (the last one)
impi = bsc.intelMpi;
2020-09-16 12:22:55 +02:00
intelMpi = bsc.intelMpi2019;
2020-09-16 12:22:55 +02:00
intelMpi2019 = callPackage ./bsc/intel-mpi/default.nix {
# Intel MPI provides a debug version of the MPI library, but
# by default we use the release variant for performance
enableDebug = false;
};
# By default we use Intel compiler 2020 update 1
iccUnwrapped = bsc.icc2020Unwrapped;
2020-09-16 12:22:55 +02:00
icc2020Unwrapped = callPackage ./bsc/intel-compiler/icc2020.nix {
intel-mpi = bsc.intelMpi;
2020-09-16 12:22:55 +02:00
};
# A wrapper script that puts all the flags and environment vars properly and
# calls the intel compiler binary
icc = callPackage ./bsc/intel-compiler/default.nix {
iccUnwrapped = bsc.iccUnwrapped;
intelLicense = bsc.intelLicense;
2020-09-16 12:22:55 +02:00
};
2020-10-13 17:43:23 +02:00
# We need to set the cc.cc.CC and cc.cc.CXX attributes, in order to
# determine the name of the compiler
# FIXME: Use a proper and automatic way to compute the compiler name
gcc = self.gcc.overrideAttrs (old1: {
cc = old1.cc.overrideAttrs (old2: {
passthru = old2.passthru // {
CC = "gcc";
CXX = "g++";
};
});
});
2020-09-16 12:22:55 +02:00
intelLicense = callPackage ./bsc/intel-compiler/license.nix { };
pmix2 = callPackage ./bsc/pmix/pmix2.nix { };
slurm17 = callPackage ./bsc/slurm/default.nix {
pmix = bsc.pmix2;
2020-09-16 12:22:55 +02:00
};
slurm17-libpmi2 = callPackage ./bsc/slurm/pmi2.nix {
pmix = bsc.pmix2;
2020-09-16 12:22:55 +02:00
};
2020-10-05 12:33:44 +02:00
# Use a slurm compatible with MN4
slurm = bsc.slurm17;
2020-10-05 12:33:44 +02:00
2020-09-16 12:22:55 +02:00
openmpi-mn4 = callPackage ./bsc/openmpi/default.nix {
pmix = bsc.pmix2;
pmi2 = bsc.slurm17-libpmi2;
2020-09-16 12:22:55 +02:00
enableCxx = true;
};
openmpi = bsc.openmpi-mn4;
2020-09-16 12:22:55 +02:00
2020-09-21 14:34:08 +02:00
fftw = callPackage ./bsc/fftw/default.nix { };
2020-09-16 12:22:55 +02:00
2020-09-21 14:34:08 +02:00
extrae = callPackage ./bsc/extrae/default.nix { };
2020-09-16 12:22:55 +02:00
tampi = bsc.tampiRelease;
2020-09-30 09:35:23 +02:00
tampiRelease = callPackage ./bsc/tampi/default.nix { };
tampiGit = callPackage ./bsc/tampi/git.nix { };
2020-09-21 14:34:08 +02:00
mcxxGit = callPackage ./bsc/mcxx/default.nix {
bison = self.bison_3_5;
2020-09-16 12:22:55 +02:00
};
2020-09-21 14:34:08 +02:00
mcxxRarias = callPackage ./bsc/mcxx/rarias.nix {
bison = self.bison_3_5;
};
2020-09-16 12:22:55 +02:00
mcxx = bsc.mcxxGit;
2020-09-16 12:22:55 +02:00
# Use nanos6 git by default
nanos6 = bsc.nanos6Git;
2020-09-21 17:30:24 +02:00
nanos6Latest = callPackage ./bsc/nanos6/default.nix { };
nanos6Git = callPackage ./bsc/nanos6/git.nix { };
2020-09-16 12:22:55 +02:00
2020-10-19 18:42:41 +02:00
jemalloc = self.jemalloc.overrideAttrs (old:
{
# Custom nanos6 configure options
configureFlags = old.configureFlags ++ [
"--with-jemalloc-prefix=nanos6_je_"
"--enable-stats"
];
});
nanos6Jemalloc = callPackage ./bsc/nanos6/git.nix {
enableJemalloc = true;
};
2020-10-16 19:31:43 +02:00
babeltrace = callPackage ./bsc/babeltrace/default.nix { };
2020-10-16 18:18:31 +02:00
babeltrace2 = callPackage ./bsc/babeltrace2/default.nix { };
2020-09-16 12:22:55 +02:00
vtk = callPackage ./bsc/vtk/default.nix {
inherit (self.xorg) libX11 xorgproto libXt;
};
dummy = callPackage ./bsc/dummy/default.nix { };
# Our custom version that lacks the binaries. Disabled by default.
#rdma-core = callPackage ./bsc/rdma-core/default.nix { };
2020-11-11 14:45:02 +01:00
2020-09-21 17:30:24 +02:00
clangOmpss2Unwrapped = callPackage ./bsc/llvm-ompss2/clang.nix {
2020-09-16 12:22:55 +02:00
stdenv = self.llvmPackages_10.stdenv;
enableDebug = false;
};
2020-09-21 17:30:24 +02:00
clangOmpss2 = callPackage bsc/llvm-ompss2/default.nix {
clangOmpss2Unwrapped = bsc.clangOmpss2Unwrapped;
2020-09-16 12:22:55 +02:00
};
stdenvOmpss2 = self.clangStdenv.override {
cc = bsc.clangOmpss2;
2020-09-16 12:22:55 +02:00
};
cpic = callPackage ./bsc/apps/cpic/default.nix {
stdenv = bsc.stdenvOmpss2;
mpi = bsc.mpi;
tampi = bsc.tampi;
2020-09-16 12:22:55 +02:00
};
mpptest = callPackage ./bsc/mpptest/default.nix { };
2020-10-05 19:13:02 +02:00
busybox = self.busybox.override {
enableStatic = true;
};
2020-11-03 11:16:58 +01:00
groff = callPackage ./bsc/groff/default.nix { };
2020-10-13 14:16:30 +02:00
nixtools = callPackage ./bsc/nixtools/default.nix { };
2020-10-05 12:33:44 +02:00
2020-10-09 15:55:37 +02:00
garlicTools = callPackage ./garlic/tools.nix {};
2020-11-17 10:57:17 +01:00
# Aliases bsc.apps -> bsc.garlic.apps
inherit (bsc.garlic) apps fig exp ds;
2020-09-16 12:22:55 +02:00
garlic = {
2020-10-09 16:13:16 +02:00
# TODO: move into garlic/default.nix
2020-10-09 15:55:37 +02:00
# Configuration for the machines
machines = callPackage ./garlic/machines.nix {};
2020-10-19 11:52:47 +02:00
report = callPackage ./garlic/report.nix {
fig = bsc.garlic.fig;
2020-10-19 11:52:47 +02:00
};
sedReport = callPackage ./garlic/sedReport.nix {
fig = bsc.garlic.fig;
};
2020-10-19 11:52:47 +02:00
2020-10-09 15:55:37 +02:00
# Use the configuration for the following target machine
targetMachine = bsc.garlic.machines.mn4;
2020-09-16 12:22:55 +02:00
# Load some helper functions to generate app variants
2020-10-09 16:13:16 +02:00
stdexp = callPackage ./garlic/stdexp.nix {
inherit (bsc.garlic) targetMachine stages;
2020-10-09 15:55:37 +02:00
};
2020-09-22 17:41:40 +02:00
# Apps for Garlic
2020-10-09 16:13:16 +02:00
apps = {
2020-10-08 17:42:17 +02:00
nbody = callPackage ./garlic/apps/nbody/default.nix {
cc = bsc.icc;
mpi = bsc.mpi;
tampi = bsc.tampi;
mcxx = bsc.mcxx;
2020-10-08 17:42:17 +02:00
gitBranch = "garlic/seq";
};
saiph = callPackage ./garlic/apps/saiph/default.nix {
cc = bsc.clangOmpss2;
2020-10-08 17:42:17 +02:00
};
2020-10-09 16:13:16 +02:00
creams = callPackage ./garlic/apps/creams/default.nix {
gnuDef = self.gfortran10 ; # Default GNU compiler version
intelDef = bsc.icc ; # Default Intel compiler version
2020-10-09 16:13:16 +02:00
gitBranch = "garlic/mpi+send+seq";
cc = bsc.icc; # bsc.icc OR self.gfortran10;
mpi = bsc.mpi; # bsc.mpi OR bsc.openmpi-mn4;
2020-10-09 16:13:16 +02:00
};
2020-09-16 12:22:55 +02:00
2020-10-09 16:13:16 +02:00
creamsInput = callPackage ./garlic/apps/creams/input.nix {
gitBranch = "garlic/mpi+send+seq";
};
2020-10-13 17:05:36 +02:00
hpcg = callPackage ./garlic/apps/hpcg/default.nix {
cc = bsc.icc;
mcxx = bsc.mcxx;
nanos6 = bsc.nanos6;
2020-10-22 13:32:20 +02:00
gitBranch = "garlic/oss";
2020-10-09 16:13:16 +02:00
};
2020-11-05 19:52:37 +01:00
heat = callPackage ./garlic/apps/heat/default.nix { };
# heat = callPackage ./garlic/apps/heat/default.nix {
# # FIXME: The heat program must be able to compile with gcc9 and newer
# stdenv = self.gcc7Stdenv;
# #mpi = intel-mpi;
# #tampi = tampi;
#
# # FIXME: Nanos6 fails to load if we are not using a compatible stdc++
# # version, so we use the same provided by gcc7
# mcxx = bsc.mcxx.override {
# nanos6 = bsc.nanos6.override {
2020-11-05 19:52:37 +01:00
# stdenv = self.gcc7Stdenv;
# };
# };
2020-10-09 16:13:16 +02:00
# };
#
# lulesh = callPackage ./garlic/apps/lulesh {
# mpi = intel-mpi;
# };
#
# hpccg = callPackage ./garlic/apps/hpccg { };
#
# fwi = callPackage ./garlic/apps/fwi { };
2020-09-21 17:30:24 +02:00
};
2020-10-09 15:55:37 +02:00
# Execution stages
stages = {
sbatch = callPackage ./garlic/stages/sbatch.nix { };
srun = callPackage ./garlic/stages/srun.nix { };
control = callPackage ./garlic/stages/control.nix { };
exec = callPackage ./garlic/stages/exec.nix { };
extrae = callPackage ./garlic/stages/extrae.nix { };
valgrind = callPackage ./garlic/stages/valgrind.nix { };
2020-10-15 18:50:34 +02:00
perf = callPackage ./garlic/stages/perf.nix { };
2020-10-09 15:55:37 +02:00
isolate = callPackage ./garlic/stages/isolate { };
2020-10-13 13:00:59 +02:00
runexp = callPackage ./garlic/stages/runexp { };
2020-10-09 15:55:37 +02:00
trebuchet = callPackage ./garlic/stages/trebuchet.nix { };
strace = callPackage ./garlic/stages/strace.nix { };
unit = callPackage ./garlic/stages/unit.nix { };
experiment = callPackage ./garlic/stages/experiment.nix { };
2020-09-16 12:22:55 +02:00
};
2020-09-22 17:41:40 +02:00
# Tests (move to bsc ?)
mpptest = callPackage ./garlic/mpptest { };
ppong = callPackage ./garlic/ppong {
mpi = bsc.mpi;
2020-09-22 17:41:40 +02:00
};
2020-09-16 12:22:55 +02:00
2020-10-30 10:56:07 +01:00
hist = callPackage ./garlic/pp/hist { };
tool = callPackage ./garlic/sh/default.nix {
sshHost = "mn1";
};
# Post processing tools
pp = with bsc.garlicTools; rec {
2020-10-30 10:56:07 +01:00
store = callPackage ./garlic/pp/store.nix { };
resultFromTrebuchet = trebuchetStage: (store {
experimentStage = getExperimentStage trebuchetStage;
inherit trebuchetStage;
});
timetable = callPackage ./garlic/pp/timetable.nix { };
rPlot = callPackage ./garlic/pp/rplot.nix { };
timetableFromTrebuchet = tre: timetable (resultFromTrebuchet tre);
mergeDatasets = callPackage ./garlic/pp/merge.nix { };
# Takes a list of experiments and returns a file that contains
# all timetable results from the experiments.
merge = exps: mergeDatasets (map timetableFromTrebuchet exps);
};
2020-10-15 18:51:55 +02:00
# Experiments
2020-09-16 12:22:55 +02:00
exp = {
nbody = rec {
2020-10-15 18:51:55 +02:00
tampi = callPackage ./garlic/exp/nbody/tampi.nix { };
2020-10-21 18:43:40 +02:00
# Experiment variants
baseline = tampi;
small = baseline.override { particles = 12 * 4096; };
# TODO: Update freeCpu using a non-standard pipeline
#freeCpu = baseline.override { freeCpu = true; };
2020-10-21 18:43:40 +02:00
jemalloc = baseline.override { enableJemalloc = true; };
2020-09-16 12:22:55 +02:00
};
2020-09-21 17:30:24 +02:00
saiph = {
2020-10-09 16:32:28 +02:00
numcomm = callPackage ./garlic/exp/saiph/numcomm.nix { };
granularity = callPackage ./garlic/exp/saiph/granularity.nix { };
2020-09-21 17:30:24 +02:00
};
2020-10-02 18:28:13 +02:00
creams = {
ss = {
2020-10-09 16:32:28 +02:00
pure = callPackage ./garlic/exp/creams/ss+pure.nix { };
hybrid = callPackage ./garlic/exp/creams/ss+hybrid.nix { };
};
};
2020-10-09 15:55:37 +02:00
2020-11-17 11:31:34 +01:00
hpcg = rec {
#serial = callPackage ./garlic/exp/hpcg/serial.nix { };
#mpi = callPackage ./garlic/exp/hpcg/mpi.nix { };
#omp = callPackage ./garlic/exp/hpcg/omp.nix { };
#mpi_omp = callPackage ./garlic/exp/hpcg/mpi+omp.nix { };
#input = callPackage ./garlic/exp/hpcg/gen.nix {
# inherit (bsc.garlic.pp) resultFromTrebuchet;
#};
genInput = callPackage ./garlic/exp/hpcg/gen.nix {
inherit (bsc.garlic.pp) resultFromTrebuchet;
2020-11-09 17:47:55 +01:00
};
2020-11-17 11:31:34 +01:00
2020-11-09 17:47:55 +01:00
oss = callPackage ./garlic/exp/hpcg/oss.nix {
2020-11-17 11:31:34 +01:00
inherit genInput;
2020-11-09 17:47:55 +01:00
};
2020-10-08 17:42:17 +02:00
};
2020-11-05 19:56:26 +01:00
heat = {
test = callPackage ./garlic/exp/heat/test.nix { };
};
2020-11-13 19:13:24 +01:00
slurm = {
cpu = callPackage ./garlic/exp/slurm/cpu.nix { };
};
2020-10-15 18:51:55 +02:00
};
2020-10-08 17:42:17 +02:00
allExperiments = self.writeText "experiments.json"
(builtins.toJSON bsc.garlic.exp);
# Datasets used in the figures
ds = with bsc.garlic; with pp; {
2020-10-23 10:53:39 +02:00
nbody = with exp.nbody; {
2020-10-30 12:41:51 +01:00
baseline = merge [ baseline ];
2020-11-17 11:36:42 +01:00
small = merge [ small ];
2020-10-30 12:41:51 +01:00
jemalloc = merge [ baseline jemalloc ];
#freeCpu = merge [ baseline freeCpu ];
};
2020-11-02 11:00:56 +01:00
hpcg = with exp.hpcg; {
oss = merge [ oss ];
};
2020-11-05 19:56:26 +01:00
2020-11-05 19:58:01 +01:00
saiph = with exp.saiph; {
numcomm = merge [ numcomm ];
granularity = merge [ granularity ];
2020-11-05 19:58:01 +01:00
};
2020-11-05 19:56:26 +01:00
heat = with exp.heat; {
test = merge [ test ];
};
2020-11-17 11:42:34 +01:00
creams = with exp.creams.ss; {
ss.hybrid = merge [ hybrid ];
ss.pure = merge [ pure ];
};
};
2020-10-15 18:51:55 +02:00
# Figures generated from the experiments
fig = with bsc.garlic; {
2020-10-15 18:51:55 +02:00
nbody = {
2020-11-02 10:36:59 +01:00
baseline = pp.rPlot {
script = ./garlic/fig/nbody/baseline.R;
dataset = ds.nbody.baseline;
2020-10-23 10:53:39 +02:00
};
2020-11-17 11:36:42 +01:00
small = pp.rPlot {
script = ./garlic/fig/nbody/baseline.R;
dataset = ds.nbody.small;
};
jemalloc = pp.rPlot {
script = ./garlic/fig/nbody/jemalloc.R;
dataset = ds.nbody.jemalloc;
};
#freeCpu = pp.rPlot {
# script = ./garlic/fig/nbody/freeCpu.R;
# dataset = ds.nbody.freeCpu;
#};
2020-11-05 19:56:26 +01:00
};
2020-11-05 19:59:47 +01:00
hpcg = {
oss = with ds.hpcg; pp.rPlot {
script = ./garlic/fig/hpcg/oss.R;
dataset = oss;
};
};
2020-11-05 19:56:26 +01:00
saiph = {
granularity = with ds.saiph; pp.rPlot {
script = ./garlic/fig/saiph/granularity.R;
dataset = granularity;
};
};
2020-11-05 19:56:26 +01:00
heat = {
test = with ds.heat; pp.rPlot {
script = ./garlic/fig/heat/test.R;
dataset = test;
};
2020-10-08 17:42:17 +02:00
};
2020-10-09 15:55:37 +02:00
};
};
});
2020-09-16 12:22:55 +02:00
in
{
bsc = _bsc;
garlic = _bsc.garlic;
2020-11-17 10:57:17 +01:00
# Aliases apps -> bsc.garlic.apps
inherit (_bsc.garlic) apps fig exp ds;
2020-09-16 12:22:55 +02:00
}