bscpkgs/garlic/exp/saiph/scaling.nix

105 lines
2.9 KiB
Nix
Raw Normal View History

2021-02-23 18:52:42 +08:00
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
2021-03-12 22:15:53 +08:00
#nbl = [ 1 2 4 8 16 32 64 ];
nodes = [ 1 2 4 8 ];
2021-03-12 22:15:53 +08:00
input = [
{ nbly=12 ; nblz=1; nbltotal=12 ; }
{ nbly=24 ; nblz=1; nbltotal=24 ; }
{ nbly=48 ; nblz=1; nbltotal=48 ; }
{ nbly=96 ; nblz=1; nbltotal=96 ; }
{ nbly=6 ; nblz=2; nbltotal=12 ; }
{ nbly=12 ; nblz=2; nbltotal=24 ; }
{ nbly=24 ; nblz=2; nbltotal=48 ; }
{ nbly=48 ; nblz=2; nbltotal=96 ; }
{ nbly=96 ; nblz=2; nbltotal=192 ; }
{ nbly=3 ; nblz=4; nbltotal=12 ; }
{ nbly=6 ; nblz=4; nbltotal=24 ; }
{ nbly=12 ; nblz=4; nbltotal=48 ; }
{ nbly=24 ; nblz=4; nbltotal=96 ; }
{ nbly=48 ; nblz=4; nbltotal=192 ; }
{ nbly=96 ; nblz=4; nbltotal=384 ; }
];
2021-02-23 18:52:42 +08:00
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph";
unitName = "${expName}-N${toString nodes}" + "-nblx${toString nblx}-nbly${toString nbly}" + "-par-init-One-dimensionalDistribution";
# unitName = if (gitCommit == "3b52a616d44f4b86880663e2d951ad89c1dcab4f")
# then "${expName}-N${toString nodes}" + "-nblx${toString nblx}-nbly${toString nbly}" + "-par-init"
# else "${expName}-N${toString nodes}" + "-nblx${toString nblx}-nbly${toString nbly}" + "-seq-init";
2021-02-23 18:52:42 +08:00
inherit (targetMachine.config) hw;
# saiph options
manualDist = 1;
nbgx = 1;
nbgy = 1;
2021-03-12 22:15:53 +08:00
nbgz = nodes*2;
nblx = 1;
2021-03-12 22:15:53 +08:00
#nbly = c.nbl;
#nblz = c.nbl;
2021-02-23 18:52:42 +08:00
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
#gitCommit = c.gitCommit; # if exp involves more than 1 commit
2021-03-12 22:15:53 +08:00
gitCommit = "3fa116620f1c7fbd1127d785c8bdc5d2372837b3";
#inherit (c) gitCommit; # if exp fixes the commit
2021-03-12 22:15:53 +08:00
inherit (c.input) nbly nblz nbltotal ;
2021-02-23 18:52:42 +08:00
# Repeat the execution of each unit 50 times
loops = 10;
# Resources
qos = "bsc_cs";
2021-03-12 22:15:53 +08:00
ntasksPerNode = hw.socketsPerNode;
2021-02-23 18:52:42 +08:00
nodes = c.nodes;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}";
};
# Compute the array of configurations
2021-03-12 22:15:53 +08:00
configsAll = stdexp.buildConfigs {
2021-02-23 18:52:42 +08:00
inherit varConf genConf;
};
2021-03-12 22:15:53 +08:00
configs = filter (el: if (el.nbly == 24 && el.nblz == 4) && el.nodes == 4 then false else true) configsAll;
2021-02-23 18:52:42 +08:00
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export OMP_NUM_THREADS=${toString hw.cpusPerSocket}
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}:
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
2021-03-12 22:15:53 +08:00
inherit (conf) manualDist nbgx nbgy nbgz nblx nbly nblz nbltotal mpi gitBranch gitCommit;
2021-02-23 18:52:42 +08:00
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
2021-03-12 22:15:53 +08:00
stdexp.genExperiment { inherit configs pipeline; }
# last plot hash: f5xb7jv1c4mbrcy6d9s9j10msfz3kkj0-plot