bscpkgs/garlic/exp/nbody/granularity-mpi.nix

72 lines
1.5 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
2020-10-09 19:33:06 +02:00
# Initial variable configuration
varConf = with bsc; {
blocksize = [ 128 256 512 1024 2048 4096 ];
2020-10-09 15:55:37 +02:00
};
2020-10-27 10:47:09 +01:00
machineConfig = targetMachine.config;
2020-10-09 19:33:06 +02:00
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
2020-10-27 10:47:09 +01:00
inherit (machineConfig) hw;
2020-10-09 15:55:37 +02:00
# nbody options
particles = 1024 * 64;
2020-10-09 15:55:37 +02:00
timesteps = 10;
2020-10-09 19:33:06 +02:00
inherit (c) blocksize;
2020-10-27 10:47:09 +01:00
totalTasks = ntasksPerNode * nodes;
particlesPerTask = particles / totalTasks;
2020-10-09 15:55:37 +02:00
cc = icc;
mpi = impi;
gitBranch = "garlic/mpi+send";
# Repeat the execution of each unit 30 times
2020-10-26 19:43:02 +01:00
loops = 10;
2020-10-09 15:55:37 +02:00
# Resources
2020-10-09 19:33:06 +02:00
qos = "debug";
ntasksPerNode = 48;
2020-10-09 15:55:37 +02:00
nodes = 1;
2020-10-09 19:40:49 +02:00
time = "02:00:00";
2020-10-09 15:55:37 +02:00
cpuBind = "sockets,verbose";
2020-10-27 10:47:09 +01:00
jobName = "bs-${toString blocksize}-${gitBranch}-nbody";
2020-10-26 19:43:02 +01:00
# Experiment revision: this allows a user to run again a experiment already
# executed
rev = 0;
2020-10-09 15:55:37 +02:00
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
2020-10-09 19:33:06 +02:00
inherit varConf genConf;
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;
2020-10-26 19:43:02 +01:00
# FIXME: This is becoming very slow:
#let
# customPkgs = stdexp.replaceMpi conf.mpi;
#in
bsc.garlic.apps.nbody.override {
inherit cc blocksize mpi gitBranch;
};
2020-10-09 15:55:37 +02:00
2020-10-09 19:40:49 +02:00
pipeline = stdexp.stdPipeline ++ [ exec program ];
2020-10-09 15:55:37 +02:00
in
2020-10-09 17:19:00 +02:00
stdexp.genExperiment { inherit configs pipeline; }