2020-10-09 15:55:37 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2020-10-09 15:55:37 +02:00
|
|
|
, stdexp
|
2020-10-09 16:32:28 +02:00
|
|
|
, bsc
|
2020-10-09 15:55:37 +02:00
|
|
|
, targetMachine
|
|
|
|
, stages
|
|
|
|
}:
|
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2020-10-09 15:55:37 +02:00
|
|
|
|
|
|
|
let
|
2020-10-09 19:33:06 +02:00
|
|
|
# Initial variable configuration
|
|
|
|
varConf = with bsc; {
|
2020-10-29 16:30:55 +01:00
|
|
|
cpuMask = [ "0x1" "0x3" "0xf" "0xff" "0xffff" "0xffffffff" "0xffffffffffff" ];
|
2020-10-09 15:55:37 +02:00
|
|
|
};
|
|
|
|
|
2020-10-09 19:33:06 +02:00
|
|
|
# Generate the complete configuration for each unit
|
|
|
|
genConf = with bsc; c: targetMachine.config // rec {
|
2020-10-09 15:55:37 +02:00
|
|
|
# nbody options
|
2020-10-28 15:35:09 +01:00
|
|
|
particles = 1024 * 64;
|
2020-10-09 15:55:37 +02:00
|
|
|
timesteps = 10;
|
2020-10-28 15:35:09 +01:00
|
|
|
blocksize = 1024;
|
|
|
|
inherit (c) cpuMask;
|
2020-10-09 15:55:37 +02:00
|
|
|
cc = icc;
|
|
|
|
mpi = impi;
|
2020-10-28 15:35:09 +01:00
|
|
|
gitBranch = "garlic/oss+task";
|
2020-10-09 15:55:37 +02:00
|
|
|
|
|
|
|
# Repeat the execution of each unit 30 times
|
|
|
|
loops = 30;
|
|
|
|
|
|
|
|
# Resources
|
2020-10-09 19:33:06 +02:00
|
|
|
qos = "debug";
|
2020-10-28 15:35:09 +01:00
|
|
|
ntasksPerNode = 1;
|
2020-10-09 15:55:37 +02:00
|
|
|
nodes = 1;
|
2020-10-09 19:40:49 +02:00
|
|
|
time = "02:00:00";
|
2020-10-28 15:35:09 +01:00
|
|
|
cpuBind = "verbose,mask_cpu:${cpuMask}";
|
|
|
|
jobName = "nbody-bs-${cpuMask}-${gitBranch}";
|
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;
|
|
|
|
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 19:40:49 +02:00
|
|
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
2020-10-09 15:55:37 +02:00
|
|
|
|
|
|
|
in
|
2020-10-28 15:35:09 +01:00
|
|
|
|
2020-10-09 17:19:00 +02:00
|
|
|
stdexp.genExperiment { inherit configs pipeline; }
|