bscpkgs/garlic/exp/nbody/old/granularity-oss.nix

60 lines
1.2 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
2021-03-24 10:12:05 +01:00
, garlicTools
2020-10-09 15:55:37 +02:00
}:
with stdenv.lib;
2021-03-24 10:12:05 +01:00
with garlicTools;
2020-10-09 15:55:37 +02:00
let
2021-03-24 10:12:05 +01:00
2020-10-09 19:33:06 +02:00
# Initial variable configuration
2021-03-24 10:12:05 +01:00
varConf = {
blocksize = [ 128 256 512 1024 2048 4096 ];
2020-10-09 15:55:37 +02:00
};
2020-10-09 19:33:06 +02:00
# Generate the complete configuration for each unit
2021-03-24 10:12:05 +01:00
genConf = c: targetMachine.config // rec {
hw = targetMachine.config.hw;
particles = 4096 * hw.cpusPerSocket;
2020-10-09 15:55:37 +02:00
timesteps = 10;
2021-03-24 10:12:05 +01:00
blocksize = c.blocksize;
gitBranch = "garlic/oss+task";
2021-03-24 10:12:05 +01:00
expName = "nbody-granularity";
unitName = expName + "-bs${toString blocksize}";
2020-10-09 15:55:37 +02:00
loops = 30;
2020-10-09 19:33:06 +02:00
qos = "debug";
ntasksPerNode = 1;
2020-10-09 15:55:37 +02:00
nodes = 1;
2020-10-09 19:40:49 +02:00
time = "02:00:00";
2021-03-24 10:12:05 +01:00
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
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
};
2021-03-24 10:12:05 +01:00
exec = {nextStage, conf, ...}: stages.exec {
2020-10-09 15:55:37 +02:00
inherit nextStage;
2021-03-24 10:12:05 +01:00
argv = [ "-t" conf.timesteps "-p" conf.particles ];
2020-10-09 15:55:37 +02:00
};
2021-03-24 10:12:05 +01:00
program = {nextStage, conf, ...}: with conf; bsc.garlic.apps.nbody.override {
inherit (conf) blocksize 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; }