bscpkgs/garlic/exp/hpcg/serial.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

2020-10-09 00:26:28 +08:00
{
stdenv
2020-10-13 23:05:36 +08:00
, stdexp
, bsc
, targetMachine
, stages
2020-10-09 00:26:28 +08:00
}:
with stdenv.lib;
let
2020-10-13 23:05:36 +08:00
# Initial variable configuration
varConf = with bsc; {
n = [ { x = 128; y = 256; z = 264; } ];
2020-10-09 00:26:28 +08:00
};
2020-10-13 23:05:36 +08:00
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
# hpcg options
n = c.n;
cc = icc;
mpi = null; # TODO: Remove this for serial
2020-10-13 23:05:36 +08:00
gitBranch = "garlic/seq";
2020-10-09 00:26:28 +08:00
2020-10-13 23:05:36 +08:00
# Repeat the execution of each unit 30 times
loops = 30;
2020-10-09 00:26:28 +08:00
2020-10-13 23:05:36 +08:00
# Resources
qos = "debug";
ntasksPerNode = 1;
2020-10-13 23:05:36 +08:00
nodes = 1;
time = "02:00:00";
cpuBind = "verbose,mask_cpu:0x1";
jobName = "hpcg-${toString n.x}-${toString n.y}-${toString n.z}-${gitBranch}";
2020-10-09 00:26:28 +08:00
};
2020-10-13 23:05:36 +08:00
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
2020-10-09 00:26:28 +08:00
};
2020-10-13 23:05:36 +08:00
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
argv = [
"--nx=${toString n.x}"
"--ny=${toString n.y}"
"--nz=${toString n.z}"
2020-10-09 00:26:28 +08:00
];
};
2020-10-13 23:05:36 +08:00
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.hpcg.override {
2020-10-09 00:26:28 +08:00
inherit cc gitBranch;
};
2020-10-13 23:05:36 +08:00
pipeline = stdexp.stdPipeline ++ [ exec program ];
2020-10-09 00:26:28 +08:00
in
2020-10-13 23:05:36 +08:00
stdexp.genExperiment { inherit configs pipeline; }