2020-09-30 17:32:49 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2020-10-09 19:33:06 +02:00
|
|
|
, stdexp
|
|
|
|
, bsc
|
|
|
|
, targetMachine
|
|
|
|
, stages
|
2020-09-30 17:32:49 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
2020-10-09 19:33:06 +02:00
|
|
|
# Initial variable configuration
|
|
|
|
varConf = {
|
2020-10-01 16:48:35 +02:00
|
|
|
input = [
|
2021-03-01 09:39:57 +01:00
|
|
|
{ nodes=1 ; nprocz=2 ; granul=999999; time= "02:00:00"; }
|
|
|
|
{ nodes=2 ; nprocz=4 ; granul=999999; time= "02:00:00"; }
|
|
|
|
{ nodes=4 ; nprocz=8 ; granul=999999; time= "02:00:00"; }
|
|
|
|
{ nodes=8 ; nprocz=16; granul=999999; time= "02:00:00"; }
|
|
|
|
{ nodes=16; nprocz=32; granul=999999; time= "02:00:00"; }
|
|
|
|
];
|
|
|
|
|
|
|
|
gitBranch = [
|
|
|
|
"garlic/mpi+send+seq"
|
2020-10-01 16:48:35 +02:00
|
|
|
];
|
2020-09-30 17:32:49 +02:00
|
|
|
};
|
|
|
|
|
2020-10-09 19:33:06 +02:00
|
|
|
# Generate the complete configuration for each unit
|
|
|
|
genConf = with bsc; c: targetMachine.config // rec {
|
2021-03-01 09:39:57 +01:00
|
|
|
expName = "creams-ss-pure";
|
2020-11-17 11:17:57 +01:00
|
|
|
inherit (targetMachine.config) hw;
|
2020-10-09 19:33:06 +02:00
|
|
|
# Options for creams
|
|
|
|
cc = icc;
|
|
|
|
mpi = impi;
|
2021-03-01 09:39:57 +01:00
|
|
|
inherit (c.input) granul time nodes;
|
|
|
|
inherit (c) gitBranch;
|
|
|
|
unitName = "${expName}-${toString nodes}-${gitBranch}";
|
2020-09-30 17:32:49 +02:00
|
|
|
|
2021-03-01 09:39:57 +01:00
|
|
|
# Repeat the execution of each unit 10 times
|
|
|
|
loops = 10;
|
2020-09-30 17:32:49 +02:00
|
|
|
|
2020-10-09 19:33:06 +02:00
|
|
|
# Resources
|
|
|
|
qos = "debug";
|
2020-12-07 15:53:01 +01:00
|
|
|
ntasksPerNode = hw.cpusPerNode;
|
2020-12-15 19:34:49 +01:00
|
|
|
cpusPerTask = 1;
|
2020-11-17 11:17:57 +01:00
|
|
|
jobName = unitName;
|
2021-03-01 09:39:57 +01:00
|
|
|
|
|
|
|
nprocz = ntasksPerNode * nodes;
|
2020-09-30 17:32:49 +02:00
|
|
|
};
|
|
|
|
|
2020-10-09 19:33:06 +02:00
|
|
|
# Compute the array of configurations
|
|
|
|
configs = stdexp.buildConfigs {
|
|
|
|
inherit varConf genConf;
|
2020-09-30 17:32:49 +02:00
|
|
|
};
|
|
|
|
|
2021-03-01 09:39:57 +01:00
|
|
|
# Custom srun stage to copy the creams input dataset
|
|
|
|
customSrun = {nextStage, conf, ...}:
|
2020-09-30 17:32:49 +02:00
|
|
|
let
|
2020-10-09 19:33:06 +02:00
|
|
|
input = bsc.garlic.apps.creamsInput.override {
|
|
|
|
inherit (conf) gitBranch granul nprocz;
|
|
|
|
};
|
2020-09-30 17:32:49 +02:00
|
|
|
in
|
2021-03-01 09:39:57 +01:00
|
|
|
stages.srun {
|
|
|
|
# These are part of the stdndard srun stage:
|
|
|
|
inherit (conf) nixPrefix;
|
2020-10-09 19:33:06 +02:00
|
|
|
inherit nextStage;
|
2021-03-01 09:39:57 +01:00
|
|
|
cpuBind = "cores,verbose";
|
|
|
|
|
|
|
|
# Now we add some commands to execute before calling srun. These will
|
|
|
|
# only run in one rank (the first in the list of allocated nodes)
|
|
|
|
preSrun = ''
|
|
|
|
cp -r ${input}/SodTubeBenchmark/* .
|
|
|
|
chmod +w -R .
|
2021-03-05 14:46:48 +01:00
|
|
|
rm -f nanos6.toml
|
2020-10-09 19:33:06 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2021-03-05 14:46:48 +01:00
|
|
|
exec = {nextStage, conf, ...}: with conf; stages.exec {
|
|
|
|
inherit nextStage;
|
|
|
|
env = ''
|
|
|
|
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Remove restarts as is not needed and is huge
|
|
|
|
post = ''
|
|
|
|
rm -rf restarts || true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-10-09 19:33:06 +02:00
|
|
|
# Creams program
|
|
|
|
creams = {nextStage, conf, ...}: with conf;
|
|
|
|
let
|
|
|
|
customPkgs = stdexp.replaceMpi conf.mpi;
|
|
|
|
in
|
|
|
|
customPkgs.apps.creams.override {
|
|
|
|
inherit cc mpi gitBranch;
|
|
|
|
};
|
2020-09-30 17:32:49 +02:00
|
|
|
|
2021-03-01 09:39:57 +01:00
|
|
|
pipeline = stdexp.stdPipelineOverride {
|
|
|
|
overrides = {
|
|
|
|
# Replace the stdandard srun stage with our own
|
|
|
|
srun = customSrun;
|
|
|
|
};
|
2021-03-05 14:46:48 +01:00
|
|
|
} ++ [ exec creams ];
|
2020-09-30 17:32:49 +02:00
|
|
|
|
|
|
|
in
|
2020-10-09 19:33:06 +02:00
|
|
|
|
|
|
|
stdexp.genExperiment { inherit configs pipeline; }
|