2020-09-16 12:22:55 +02:00
|
|
|
self: /* Future last stage */
|
|
|
|
super: /* Previous stage */
|
|
|
|
|
|
|
|
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
|
|
|
|
# --------------------------------------------------------- #
|
|
|
|
|
2020-09-16 12:22:55 +02:00
|
|
|
bsc = {
|
|
|
|
# Default MPI implementation to use. Will be overwritten by the
|
|
|
|
# experiments.
|
2020-09-22 18:02:32 +02:00
|
|
|
mpi = self.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 { };
|
|
|
|
|
2020-10-07 09:49:42 +02:00
|
|
|
mpichDebug = self.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 = self.bsc.intelMpi;
|
|
|
|
|
|
|
|
intelMpi = self.bsc.intelMpi2019;
|
|
|
|
|
|
|
|
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 = self.bsc.icc2020Unwrapped;
|
|
|
|
|
|
|
|
icc2020Unwrapped = callPackage ./bsc/intel-compiler/icc2020.nix {
|
|
|
|
intel-mpi = self.bsc.intelMpi;
|
|
|
|
};
|
|
|
|
|
|
|
|
# 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 = self.bsc.iccUnwrapped;
|
|
|
|
intelLicense = self.bsc.intelLicense;
|
|
|
|
};
|
|
|
|
|
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 = self.bsc.pmix2;
|
|
|
|
};
|
|
|
|
|
|
|
|
slurm17-libpmi2 = callPackage ./bsc/slurm/pmi2.nix {
|
|
|
|
pmix = self.bsc.pmix2;
|
|
|
|
};
|
|
|
|
|
2020-10-05 12:33:44 +02:00
|
|
|
# Use a slurm compatible with MN4
|
|
|
|
slurm = self.bsc.slurm17;
|
|
|
|
|
2020-09-16 12:22:55 +02:00
|
|
|
openmpi-mn4 = callPackage ./bsc/openmpi/default.nix {
|
|
|
|
pmix = self.bsc.pmix2;
|
|
|
|
pmi2 = self.bsc.slurm17-libpmi2;
|
|
|
|
enableCxx = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
openmpi = self.bsc.openmpi-mn4;
|
|
|
|
|
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
|
|
|
|
2020-10-05 10:31:09 +02:00
|
|
|
tampi = self.bsc.tampiGit;
|
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
|
|
|
|
2020-09-21 14:34:08 +02:00
|
|
|
mcxx = self.bsc.mcxxGit;
|
2020-09-16 12:22:55 +02:00
|
|
|
|
|
|
|
# Use nanos6 git by default
|
2020-09-21 17:30:24 +02:00
|
|
|
nanos6 = self.bsc.nanos6Git;
|
|
|
|
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 { };
|
|
|
|
|
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 = self.bsc.clangOmpss2Unwrapped;
|
2020-09-16 12:22:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
stdenvOmpss2 = self.clangStdenv.override {
|
2020-09-21 17:30:24 +02:00
|
|
|
cc = self.bsc.clangOmpss2;
|
2020-09-16 12:22:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
cpic = callPackage ./bsc/apps/cpic/default.nix {
|
|
|
|
stdenv = self.bsc.stdenvOmpss2;
|
|
|
|
mpi = self.bsc.mpi;
|
|
|
|
tampi = self.bsc.tampi;
|
|
|
|
};
|
|
|
|
|
|
|
|
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-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 = self.bsc.garlic.fig;
|
|
|
|
};
|
|
|
|
|
2020-10-09 15:55:37 +02:00
|
|
|
# Use the configuration for the following target machine
|
|
|
|
targetMachine = self.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 {
|
2020-10-09 15:55:37 +02:00
|
|
|
inherit (self.garlic) targetMachine stages;
|
|
|
|
};
|
2020-09-22 17:41:40 +02:00
|
|
|
|
|
|
|
# Apps for Garlic
|
2020-09-30 17:32:49 +02:00
|
|
|
|
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 = self.bsc.icc;
|
|
|
|
mpi = self.bsc.mpi;
|
|
|
|
tampi = self.bsc.tampi;
|
|
|
|
mcxx = self.bsc.mcxx;
|
|
|
|
gitBranch = "garlic/seq";
|
|
|
|
};
|
|
|
|
|
|
|
|
saiph = callPackage ./garlic/apps/saiph/default.nix {
|
|
|
|
cc = self.bsc.clangOmpss2;
|
|
|
|
};
|
|
|
|
|
2020-10-09 16:13:16 +02:00
|
|
|
creams = callPackage ./garlic/apps/creams/default.nix {
|
|
|
|
gnuDef = self.gfortran10 ; # Default GNU compiler version
|
|
|
|
intelDef = self.bsc.icc ; # Default Intel compiler version
|
|
|
|
gitBranch = "garlic/mpi+send+seq";
|
|
|
|
cc = self.bsc.icc; # self.bsc.icc OR self.gfortran10;
|
|
|
|
mpi = self.bsc.mpi; # self.bsc.mpi OR self.bsc.openmpi-mn4;
|
|
|
|
};
|
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 {
|
2020-10-09 16:13:16 +02:00
|
|
|
cc = self.bsc.icc;
|
2020-10-22 13:32:20 +02:00
|
|
|
mcxx = self.bsc.mcxx;
|
|
|
|
nanos6 = self.bsc.nanos6;
|
|
|
|
gitBranch = "garlic/oss";
|
|
|
|
|
|
|
|
# cc = self.bsc.icc;
|
|
|
|
# gitBranch = "garlic/seq";
|
|
|
|
|
|
|
|
# cc = self.bsc.icc;
|
|
|
|
# mpi = self.bsc.mpi;
|
|
|
|
# gitBranch = "garlic/mpi";
|
|
|
|
|
|
|
|
# cc = self.bsc.icc;
|
|
|
|
# gitBranch = "garlic/omp";
|
|
|
|
|
|
|
|
# cc = self.bsc.icc;
|
|
|
|
# mpi = self.bsc.mpi;
|
|
|
|
# gitBranch = "garlic/mpi+omp";
|
|
|
|
|
2020-10-09 16:13:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# heat = callPackage ./garlic/apps/heat {
|
|
|
|
# stdenv = pkgs.gcc7Stdenv;
|
|
|
|
# mpi = intel-mpi;
|
|
|
|
# tampi = tampi;
|
|
|
|
# };
|
|
|
|
#
|
|
|
|
# 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 = self.bsc.mpi;
|
|
|
|
};
|
2020-09-16 12:22:55 +02:00
|
|
|
|
2020-10-15 18:51:55 +02:00
|
|
|
# Experiments
|
2020-09-16 12:22:55 +02:00
|
|
|
exp = {
|
2020-10-21 18:18:43 +02:00
|
|
|
nbody = rec {
|
2020-10-09 16:32:28 +02:00
|
|
|
test = callPackage ./garlic/exp/nbody/test.nix { };
|
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
|
2020-10-23 10:19:37 +02:00
|
|
|
medium = tampi.override { particles = 24 * 4096; };
|
2020-10-21 18:43:40 +02:00
|
|
|
baseline = medium;
|
|
|
|
freeCpu = baseline.override { freeCpu = true; };
|
|
|
|
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 { };
|
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-02 17:48:00 +02:00
|
|
|
};
|
2020-09-30 17:32:49 +02:00
|
|
|
};
|
2020-10-09 15:55:37 +02:00
|
|
|
|
2020-10-08 18:24:56 +02:00
|
|
|
hpcg = {
|
|
|
|
serial = callPackage ./garlic/exp/hpcg/serial.nix { };
|
2020-10-13 14:59:49 +02:00
|
|
|
mpi = callPackage ./garlic/exp/hpcg/mpi.nix { };
|
2020-10-13 19:20:24 +02:00
|
|
|
omp = callPackage ./garlic/exp/hpcg/omp.nix { };
|
|
|
|
mpi_omp = callPackage ./garlic/exp/hpcg/mpi+omp.nix { };
|
2020-10-22 13:32:20 +02:00
|
|
|
oss = callPackage ./garlic/exp/hpcg/oss.nix { };
|
2020-10-08 17:42:17 +02:00
|
|
|
};
|
2020-10-15 18:51:55 +02:00
|
|
|
};
|
2020-10-08 17:42:17 +02:00
|
|
|
|
2020-10-21 18:18:43 +02:00
|
|
|
hist = callPackage ./garlic/pp/hist { };
|
|
|
|
|
2020-10-15 18:51:55 +02:00
|
|
|
# Post processing tools
|
2020-10-21 18:18:43 +02:00
|
|
|
pp = rec {
|
|
|
|
getExpResult = callPackage ./garlic/pp/result.nix {
|
|
|
|
inherit fetchExperiment;
|
|
|
|
};
|
|
|
|
resultFromTrebuchet = trebuchetStage: getExpResult {
|
|
|
|
garlicTemp = "/tmp/garlic-temp";
|
|
|
|
inherit trebuchetStage;
|
|
|
|
experimentStage = with self.bsc.garlicTools;
|
|
|
|
getExperimentStage trebuchetStage;
|
|
|
|
};
|
|
|
|
fetchExperiment = callPackage ./garlic/pp/fetch.nix { };
|
|
|
|
timetable = callPackage ./garlic/pp/timetable.nix { };
|
|
|
|
rPlot = callPackage ./garlic/pp/rplot.nix { };
|
|
|
|
timetableFromTrebuchet = tre: timetable (resultFromTrebuchet tre);
|
|
|
|
mergeDatasets = callPackage ./garlic/pp/merge.nix { };
|
|
|
|
|
2020-10-23 10:19:37 +02:00
|
|
|
# Takes a list of experiments and returns a file that contains
|
2020-10-21 18:18:43 +02:00
|
|
|
# all timetable results from the experiments.
|
|
|
|
merge = exps: mergeDatasets (map timetableFromTrebuchet exps);
|
2020-10-19 18:44:20 +02:00
|
|
|
};
|
2020-10-15 18:51:55 +02:00
|
|
|
|
2020-10-23 10:19:37 +02:00
|
|
|
# Datasets used in the figures
|
2020-10-23 10:53:39 +02:00
|
|
|
ds = with self.bsc.garlic; with pp; {
|
|
|
|
nbody = with exp.nbody; {
|
|
|
|
test = merge [ baseline ];
|
|
|
|
jemalloc = merge [ baseline jemalloc ];
|
|
|
|
freeCpu = merge [ baseline freeCpu ];
|
2020-10-23 10:19:37 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-10-15 18:51:55 +02:00
|
|
|
# Figures generated from the experiments
|
2020-10-21 18:18:43 +02:00
|
|
|
fig = with self.bsc.garlic; {
|
2020-10-15 18:51:55 +02:00
|
|
|
nbody = {
|
2020-10-21 18:18:43 +02:00
|
|
|
|
2020-10-23 10:53:39 +02:00
|
|
|
test = pp.rPlot {
|
|
|
|
script = ./garlic/fig/nbody/test.R;
|
|
|
|
dataset = ds.nbody.test;
|
|
|
|
};
|
|
|
|
|
2020-10-21 18:18:43 +02:00
|
|
|
jemalloc = pp.rPlot {
|
|
|
|
script = ./garlic/fig/nbody/jemalloc.R;
|
2020-10-23 10:19:37 +02:00
|
|
|
dataset = ds.nbody.jemalloc;
|
2020-10-19 18:44:20 +02:00
|
|
|
};
|
2020-10-21 18:18:43 +02:00
|
|
|
|
|
|
|
freeCpu = pp.rPlot {
|
|
|
|
script = ./garlic/fig/nbody/freeCpu.R;
|
2020-10-23 10:19:37 +02:00
|
|
|
dataset = ds.nbody.freeCpu;
|
2020-10-19 18:44:20 +02:00
|
|
|
};
|
2020-10-21 18:18:43 +02:00
|
|
|
|
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;
|
2020-09-21 14:34:08 +02:00
|
|
|
|
2020-10-09 16:13:16 +02:00
|
|
|
# Aliases
|
2020-09-21 14:34:08 +02:00
|
|
|
garlic = bsc.garlic;
|
2020-10-23 10:19:37 +02:00
|
|
|
inherit (bsc.garlic) exp fig apps ds;
|
2020-09-16 12:22:55 +02:00
|
|
|
}
|