bscpkgs/garlic/exp/nbody/test.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2020-10-09 15:55:37 +02:00
{
stdenv
, stdexp
2020-10-09 16:32:28 +02:00
, bsc
2020-10-09 15:55:37 +02:00
, targetMachine
, stages
}:
with stdenv.lib;
let
# Configurations for each unit (using the cartesian product)
confUnit = with bsc; {
blocksize = [ 1024 2048 ];
};
# Configuration for the complete experiment
confExperiment = with bsc; {
# nbody options
particles = 1024 * 4;
timesteps = 10;
cc = icc;
mpi = impi;
gitBranch = "garlic/mpi+send";
# Repeat the execution of each unit 30 times
loops = 30;
# Resources
ntasksPerNode = 2;
nodes = 1;
cpuBind = "sockets,verbose";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
var = confUnit;
2020-10-09 17:19:00 +02:00
fixed = targetMachine.config // confExperiment;
2020-10-09 15:55:37 +02:00
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
argv = [ "-t" timesteps "-p" particles ];
};
program = {nextStage, conf, ...}: with conf;
let
2020-10-09 17:19:00 +02:00
customPkgs = stdexp.replaceMpi conf.mpi;
2020-10-09 15:55:37 +02:00
in
2020-10-09 17:19:00 +02:00
customPkgs.apps.nbody.override {
inherit cc blocksize mpi gitBranch;
};
2020-10-09 15:55:37 +02:00
2020-10-09 17:19:00 +02:00
pipeline = stdexp.stdStages ++ [ exec program ];
2020-10-09 15:55:37 +02:00
in
2020-10-09 17:19:00 +02:00
stdexp.genExperiment { inherit configs pipeline; }