bscpkgs/garlic/exp/heat/granul.nix

82 lines
1.6 KiB
Nix
Raw Normal View History

2020-11-05 19:56:26 +01:00
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
2021-03-05 16:18:51 +01:00
, garlicTools
2020-11-05 19:56:26 +01:00
}:
with stdenv.lib;
2021-03-05 16:18:51 +01:00
with garlicTools;
2020-11-05 19:56:26 +01:00
let
# Initial variable configuration
varConf = with bsc; {
2021-03-05 16:18:51 +01:00
cbs = range2 8 4096;
rbs = range2 32 4096;
2020-11-05 19:56:26 +01:00
};
machineConfig = targetMachine.config;
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "heat";
2021-03-05 16:18:51 +01:00
unitName = expName +
".cbs-${toString cbs}" +
".rbs-${toString rbs}";
2020-11-05 19:56:26 +01:00
inherit (machineConfig) hw;
# heat options
timesteps = 10;
2021-03-05 16:18:51 +01:00
cols = 1024 * 16; # Columns
rows = 1024 * 16; # Rows
cbs = c.cbs;
rbs = c.rbs;
gitBranch = "garlic/tampi+isend+oss+task";
2020-11-05 19:56:26 +01:00
# Repeat the execution of each unit 30 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = 1;
nodes = 1;
time = "02:00:00";
# Assign one socket to each task (only one process)
cpusPerTask = hw.cpusPerSocket;
2020-11-05 19:56:26 +01:00
jobName = unitName;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
2021-03-05 16:18:51 +01:00
exec = {nextStage, conf, ...}: stages.exec {
2020-11-05 19:56:26 +01:00
inherit nextStage;
2021-03-05 16:18:51 +01:00
argv = [
"--rows" conf.rows
"--cols" conf.cols
"--rbs" conf.rbs
"--cbs" conf.cbs
"--timesteps" conf.timesteps
];
# The next stage is the program
2020-11-05 19:56:26 +01:00
env = ''
2021-03-05 16:18:51 +01:00
ln -sf ${nextStage}/etc/heat.conf heat.conf || true
2020-11-05 19:56:26 +01:00
'';
};
2021-03-05 16:18:51 +01:00
program = {nextStage, conf, ...}: bsc.garlic.apps.heat.override {
inherit (conf) gitBranch;
};
2020-11-05 19:56:26 +01:00
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }