bscpkgs/garlic/exp/nbody/strong-scaling-mpi.nix

66 lines
1.4 KiB
Nix
Raw Normal View History

{
stdenv
, stdexp
, bsc
, targetMachine
, stages
2021-03-26 18:16:17 +01:00
, garlicTools
}:
with stdenv.lib;
2021-03-26 18:16:17 +01:00
with garlicTools;
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"
];
};
# 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;
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}";
loops = 30;
2021-03-26 18:16:17 +01:00
nodes = numNodes;
qos = "debug";
2021-03-26 18:16:17 +01:00
ntasksPerNode = 2;
time = "02:00:00";
2021-03-26 18:16:17 +01:00
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
2021-03-26 18:16:17 +01:00
exec = {nextStage, conf, ...}: stages.exec {
inherit nextStage;
2021-03-26 18:16:17 +01:00
argv = [ "-t" conf.timesteps "-p" conf.particles ];
};
2021-03-26 18:16:17 +01:00
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
inherit (conf) blocksize gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }