bscpkgs/garlic/exp/creams/ss+pure.nix

88 lines
1.9 KiB
Nix
Raw Normal View History

{
stdenv
2020-10-10 01:33:06 +08:00
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
2020-10-10 01:33:06 +08:00
# Initial variable configuration
varConf = {
input = [
{ time="02:00:00"; nodes=1; }
{ time="02:00:00"; nodes=2; }
{ time="02:00:00"; nodes=4; }
2020-10-10 01:33:06 +08:00
{ time="02:00:00"; nodes=8; }
{ time="02:00:00"; nodes=16; }
];
};
2020-10-10 01:33:06 +08:00
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-ss";
unitName = "${expName}-${toString nodes}-${gitBranch}";
inherit (targetMachine.config) hw;
2020-10-10 01:33:06 +08:00
# Options for creams
cc = icc;
mpi = impi;
granul = 0;
gitBranch = "garlic/mpi+send+seq";
nprocz = ntasksPerNode * nodes;
2020-10-10 01:33:06 +08:00
# Repeat the execution of each unit 30 times
loops = 30;
2020-10-10 01:33:06 +08:00
# Resources
qos = "debug";
2020-12-07 22:53:01 +08:00
ntasksPerNode = hw.cpusPerNode;
cpusPerTask = 1;
2020-10-10 01:33:06 +08:00
inherit (c.input) time nodes;
jobName = unitName;
};
2020-10-10 01:33:06 +08:00
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Use nanos6 with regions
nanos6Env = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
};
2020-10-10 01:33:06 +08:00
# Custom stage to copy the creams input dataset
copyInput = {nextStage, conf, ...}:
let
2020-10-10 01:33:06 +08:00
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
2020-10-10 01:33:06 +08:00
stages.exec {
inherit nextStage;
env = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ];
in
2020-10-10 01:33:06 +08:00
stdexp.genExperiment { inherit configs pipeline; }