Simplify experiment

This commit is contained in:
2020-10-09 17:19:00 +02:00
parent 9d2ce2a1c2
commit 53dca32469
3 changed files with 25 additions and 232 deletions

View File

@@ -15,7 +15,7 @@ in
rec {
/* Takes a list of units and builds an experiment, after executing the
trebuchet and the isolate stages. Returns the trebuchet stage. */
buildExperiment = units: stages.trebuchet {
buildTrebuchet = units: stages.trebuchet {
inherit (machineConf) nixPrefix;
nextStage = stages.isolate {
inherit (machineConf) nixPrefix;
@@ -81,4 +81,21 @@ rec {
newOverlay
];
};
replaceMpi = mpi: genPkgs (self: super: {
bsc = super.bsc // { inherit mpi; };
});
# Generate the experimental units
genUnits = {configs, pipeline}: map (c: stages.unit {
conf = c;
stages = pipeline;
}) configs;
# Generate the complete experiment
genExperiment = {configs, pipeline}:
let
units = genUnits { inherit configs pipeline; };
in
buildTrebuchet units;
}