bscpkgs/garlic/exp/hpcg/mpi.nix

66 lines
1.3 KiB
Nix
Raw Normal View History

2020-10-13 20:59:49 +08:00
{
stdenv
2020-10-13 23:05:36 +08:00
, stdexp
, bsc
, targetMachine
, stages
2020-10-13 20:59:49 +08:00
}:
with stdenv.lib;
let
2020-10-13 23:05:36 +08:00
# Initial variable configuration
varConf = with bsc; {
2020-10-13 20:59:49 +08:00
n = [ 104 64 ];
};
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 = impi;
gitBranch = "garlic/mpi";
# FIXME: fix this option in the garlic/mpi git branch
makefileName = "MPI";
2020-10-13 20:59:49 +08:00
2020-10-13 23:05:36 +08:00
# Repeat the execution of each unit 30 times
loops = 30;
2020-10-13 20:59:49 +08:00
2020-10-13 23:05:36 +08:00
# Resources
qos = "debug";
ntasksPerNode = 48;
nodes = 1;
time = "02:00:00";
cpuBind = "sockets,verbose";
jobName = "hpcg-${toString n}-${gitBranch}";
2020-10-13 20:59:49 +08:00
};
2020-10-13 23:05:36 +08:00
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
2020-10-13 20:59:49 +08:00
};
2020-10-13 23:05:36 +08:00
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
argv = [
"--nx=${toString n}"
"--ny=${toString n}"
"--nz=${toString n}"
2020-10-13 20:59:49 +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-13 20:59:49 +08:00
inherit cc mpi gitBranch makefileName;
};
2020-10-13 23:05:36 +08:00
pipeline = stdexp.stdPipeline ++ [ exec program ];
2020-10-13 20:59:49 +08:00
in
2020-10-13 23:05:36 +08:00
stdexp.genExperiment { inherit configs pipeline; }