bscpkgs/garlic/exp/hpcg/gen.nix

53 lines
951 B
Nix
Raw Normal View History

2020-11-10 00:47:55 +08:00
{
stdenv
2022-09-01 22:27:29 +08:00
, lib
2020-11-10 00:47:55 +08:00
, stdexp
, bsc
, targetMachine
, stages
, garlicTools
, callPackage
2020-11-10 00:47:55 +08:00
}:
2022-09-01 22:27:29 +08:00
with lib;
2020-11-10 00:47:55 +08:00
with garlicTools;
rec {
2020-11-10 00:47:55 +08:00
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = "hpcg-gen";
unitName = expName
+ "-nodes${toString nodes}"
+ "-spt.z${toString sizePerTask.z}";
2020-11-10 00:47:55 +08:00
inherit (targetMachine.config) hw;
2020-11-10 00:47:55 +08:00
# Inherit options from the current conf
inherit (c) sizePerTask nprocs disableAspectRatio gitBranch
cpusPerTask ntasksPerNode nodes;
# nblocks and ncomms are ignored from c
ncomms = 1;
nblocks = 1;
2020-11-10 00:47:55 +08:00
# We only need one run
2020-11-10 00:47:55 +08:00
loops = 1;
# Generate the input
enableGen = true;
2020-11-10 00:47:55 +08:00
# Resources
qos = "debug";
time = "02:00:00";
2020-11-10 00:47:55 +08:00
jobName = unitName;
};
common = callPackage ./common.nix {};
2020-11-10 00:47:55 +08:00
getInputTre = conf: stdexp.genExperiment {
configs = [ (genConf conf) ];
pipeline = common.pipeline;
};
}