bscpkgs/garlic/exp/creams/gran+node16.nix

116 lines
2.9 KiB
Nix
Raw Normal View History

2021-02-22 20:47:26 +01:00
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=16 ; nprocz=32 ; granul=128; time= "02:00:00"; }
2021-02-22 20:47:26 +01:00
{ nodes=16 ; nprocz=32 ; granul=64; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul=32; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul=16; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 9; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 5; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 4; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 2; time= "02:00:00"; }
2021-02-22 20:47:26 +01:00
];
gitBranch = [
"garlic/mpi+send+omp+fork"
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
2021-02-22 20:47:26 +01:00
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node16";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
2021-02-22 20:47:26 +01:00
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
2021-02-22 20:47:26 +01:00
# Repeat the execution of each unit 10 times
loops = 10;
2021-02-22 20:47:26 +01:00
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
2021-02-22 20:47:26 +01:00
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
2021-02-22 20:47:26 +01:00
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
2021-02-22 20:47:26 +01:00
inherit nextStage;
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 .
rm -f nanos6.toml
2021-02-22 20:47:26 +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
'';
};
2021-02-22 20:47:26 +01:00
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
2021-02-22 20:47:26 +01:00
in
stdexp.genExperiment { inherit configs pipeline; }