2020-10-29 16:31:21 +01:00
|
|
|
{
|
|
|
|
stdenv
|
|
|
|
, stdexp
|
|
|
|
, bsc
|
|
|
|
, targetMachine
|
|
|
|
, stages
|
2021-03-26 18:16:17 +01:00
|
|
|
, garlicTools
|
2020-10-29 16:31:21 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2021-03-26 18:16:17 +01:00
|
|
|
with garlicTools;
|
2020-10-29 16:31:21 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
# Initial variable configuration
|
|
|
|
varConf = with bsc; {
|
2021-03-26 18:16:17 +01:00
|
|
|
blocksize = [ 512 ];
|
|
|
|
nodes = [ 1 2 4 8 16 ];
|
|
|
|
gitBranch = [
|
|
|
|
"garlic/mpi+send+oss+task"
|
|
|
|
"garlic/tampi+send+oss+task"
|
|
|
|
"garlic/tampi+isend+oss+task"
|
|
|
|
];
|
2020-10-29 16:31:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Generate the complete configuration for each unit
|
2021-03-26 18:16:17 +01:00
|
|
|
genConf = c: targetMachine.config // rec {
|
|
|
|
hw = targetMachine.config.hw;
|
|
|
|
particles = 16 * 4096 * hw.cpusPerSocket;
|
2020-10-29 16:31:21 +01:00
|
|
|
timesteps = 10;
|
2021-03-26 18:16:17 +01:00
|
|
|
blocksize = c.blocksize;
|
|
|
|
numNodes = c.nodes;
|
|
|
|
gitBranch = c.gitBranch;
|
|
|
|
|
|
|
|
expName = "nbody-scaling";
|
|
|
|
unitName = expName + "-${toString gitBranch}" + "-nodes${toString numNodes}";
|
2020-10-29 16:31:21 +01:00
|
|
|
|
|
|
|
loops = 30;
|
|
|
|
|
2021-03-26 18:16:17 +01:00
|
|
|
nodes = numNodes;
|
2020-10-29 16:31:21 +01:00
|
|
|
qos = "debug";
|
2021-03-26 18:16:17 +01:00
|
|
|
ntasksPerNode = 2;
|
2020-10-29 16:31:21 +01:00
|
|
|
time = "02:00:00";
|
2021-03-26 18:16:17 +01:00
|
|
|
cpusPerTask = hw.cpusPerSocket;
|
|
|
|
jobName = unitName;
|
2020-10-29 16:31:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Compute the array of configurations
|
|
|
|
configs = stdexp.buildConfigs {
|
|
|
|
inherit varConf genConf;
|
|
|
|
};
|
|
|
|
|
2021-03-26 18:16:17 +01:00
|
|
|
exec = {nextStage, conf, ...}: stages.exec {
|
2020-10-29 16:31:21 +01:00
|
|
|
inherit nextStage;
|
2021-03-26 18:16:17 +01:00
|
|
|
argv = [ "-t" conf.timesteps "-p" conf.particles ];
|
2020-10-29 16:31:21 +01:00
|
|
|
};
|
|
|
|
|
2021-03-26 18:16:17 +01:00
|
|
|
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
|
|
|
|
inherit (conf) blocksize gitBranch;
|
|
|
|
};
|
2020-10-29 16:31:21 +01:00
|
|
|
|
|
|
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdexp.genExperiment { inherit configs pipeline; }
|