hpcg: merge weak scaling and add size experiment

The scaling.nix file defines both the strong and weak experiments by
using the parameter "enableStrong".
This commit is contained in:
Rodrigo Arias 2021-04-19 15:57:31 +02:00
parent a71ae9c2c6
commit a96839d11a
5 changed files with 90 additions and 225 deletions

View File

@ -1,89 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
, genInput
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
n = [ { x = 192; y = 192; z = 192; } ];
nprocs = [
{ x = 2; y = 1; z = 1; }
{ x = 2; y = 2; z = 1; }
{ x = 2; y = 2; z = 2; }
{ x = 4; y = 2; z = 2; }
{ x = 4; y = 4; z = 2; }
];
# nblocks = [ 12 24 48 96 192 384 768 1536 ];
nblocks = [ 384 768 1536 ];
ncommblocks = [ 1 ];
# nodes = [ 1 ];
# nodes = [ 1 2 4 8 16 ];
};
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = "hpcg.oss";
unitName = "${expName}.nb${toString nblocks}";
inherit (targetMachine.config) hw;
# hpcg options
inherit (c) n nprocs nblocks ncommblocks;
gitBranch = "garlic/tampi+isend+oss+task";
# Repeat the execution of each unit 30 times
loops = 10;
disableAspectRatio = false;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
time = "02:00:00";
# task in one socket
cpusPerTask = hw.cpusPerSocket;
nodes = (nprocs.x * nprocs.y * nprocs.z) / ntasksPerNode;
jobName = "hpcg-${toString n.x}-${toString n.y}-${toString n.z}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
input = genInput configs;
exec = {nextStage, conf, ...}: stages.exec {
inherit nextStage;
argv = [
"--nx=${toString conf.n.x}"
"--ny=${toString conf.n.y}"
"--nz=${toString conf.n.z}"
"--npx=${toString conf.nprocs.x}"
"--npy=${toString conf.nprocs.y}"
"--npz=${toString conf.nprocs.z}"
"--nblocks=${toString conf.nblocks}"
"--ncomms=${toString conf.ncommblocks}"
# The input symlink is generated by the input stage, which is generated by
# the genInput function.
"--load=input"
];
};
program = {nextStage, conf, ...}: bsc.apps.hpcg.override {
inherit (conf) gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ input exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,104 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
, genInput
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
n = [ { x = 192; y = 192; z = 192; } ];
nprocs = [
{ x = 2; y = 1; z = 1; }
{ x = 4; y = 1; z = 1; }
{ x = 8; y = 1; z = 1; }
{ x = 16; y = 1; z = 1; }
{ x = 32; y = 1; z = 1; }
{ x = 1; y = 2; z = 1; }
{ x = 1; y = 4; z = 1; }
{ x = 1; y = 8; z = 1; }
{ x = 1; y = 16; z = 1; }
{ x = 1; y = 32; z = 1; }
{ x = 1; y = 1; z = 2; }
{ x = 1; y = 1; z = 4; }
{ x = 1; y = 1; z = 8; }
{ x = 1; y = 1; z = 16; }
{ x = 1; y = 1; z = 32; }
];
# nblocks = [ 12 24 48 96 192 384 768 1536 ];
nblocks = [ 384 768 1536 ];
ncommblocks = [ 1 ];
# nodes = [ 1 ];
# nodes = [ 1 2 4 8 16 ];
};
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = "hpcg.oss";
unitName = "${expName}.nb${toString nblocks}";
inherit (targetMachine.config) hw;
# hpcg options
inherit (c) n nprocs nblocks ncommblocks;
gitBranch = "garlic/tampi+isend+oss+task";
# Repeat the execution of each unit 30 times
loops = 10;
disableAspectRatio = true;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
time = "02:00:00";
# task in one socket
cpusPerTask = hw.cpusPerSocket;
nodes = (nprocs.x * nprocs.y * nprocs.z) / ntasksPerNode;
jobName = "hpcg-${toString n.x}-${toString n.y}-${toString n.z}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
input = genInput configs;
exec = {nextStage, conf, ...}: stages.exec {
inherit nextStage;
argv = [
"--nx=${toString conf.n.x}"
"--ny=${toString conf.n.y}"
"--nz=${toString conf.n.z}"
# Distribute all processes in X axis
"--npx=${toString conf.nprocs.x}"
"--npy=${toString conf.nprocs.y}"
"--npz=${toString conf.nprocs.z}"
"--nblocks=${toString conf.nblocks}"
"--ncomms=${toString conf.ncommblocks}"
# The input symlink is generated by the input stage, which is generated by
# the genInput function.
"--load=input"
# Disable HPCG Aspect Ratio to run any mpi layout
] ++ optional (conf.disableAspectRatio) "--no-ar=1";
};
program = {nextStage, conf, ...}: bsc.apps.hpcg.override {
inherit (conf) gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ input exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -0,0 +1,77 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
, garlicTools
, callPackage
, enableExtended ? false
, enableStrong ? true
}:
with stdenv.lib;
with garlicTools;
let
common = callPackage ./common.nix { };
inherit (common) pipeline getSizePerTask;
maxNodes = 16;
# Initial variable configuration
varConf = {
nodes = range2 1 maxNodes;
baseSizeZ = if (enableExtended) then [ 8 16 ] else [ 16 ];
blocksPerCpu = if (enableExtended) then range2 1 8 else [ 4 ];
gitBranch = [
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = if (enableStrong) then "hpcg-ss" else "hpcg-ws";
unitName = "${expName}"
+ "-nodes${toString nodes}"
+ "-bpc${toString blocksPerCpu}";
inherit (targetMachine.config) hw;
inherit maxNodes;
sizeFactor = if (enableStrong) then maxNodes / nodes else 1;
# hpcg options
inherit (c) nodes blocksPerCpu gitBranch;
totalTasks = ntasksPerNode * nodes;
sizePerCpu = {
x = 2;
y = 2;
z = c.baseSizeZ * sizeFactor;
};
sizePerTask = getSizePerTask cpusPerTask sizePerCpu;
nprocs = { x=1; y=1; z=totalTasks; };
nblocks = blocksPerCpu * cpusPerTask;
ncomms = 1;
disableAspectRatio = true;
# Repeat the execution of each unit several times
loops = 10;
# Resources
qos = "debug";
time = "02:00:00";
cpusPerTask = hw.cpusPerSocket;
ntasksPerNode = hw.socketsPerNode;
jobName = unitName;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -6,7 +6,6 @@
, stages , stages
, garlicTools , garlicTools
, callPackage , callPackage
, enableExtended ? false
}: }:
with stdenv.lib; with stdenv.lib;
@ -19,36 +18,33 @@ let
# Initial variable configuration # Initial variable configuration
varConf = { varConf = {
nodes = range2 1 16; sizeFactor = [ 1 2 4 8 16 32 ];
blocksPerCpu = if (enableExtended)
then range2 1 8
else [ 4 ];
gitBranch = [
"garlic/tampi+isend+oss+task"
];
}; };
# Generate the complete configuration for each unit # Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec { genConf = c: targetMachine.config // rec {
expName = "hpcg-ss"; expName = "hpcg-size";
unitName = "${expName}" unitName = "${expName}"
+ "-nodes${toString nodes}" + "-nodes${toString nodes}"
+ "-bpc${toString blocksPerCpu}"; + "-sf${toString sizeFactor}";
inherit (targetMachine.config) hw; inherit (targetMachine.config) hw;
# hpcg options # hpcg options
inherit (c) nodes blocksPerCpu gitBranch; inherit (c) sizeFactor;
gitBranch = "garlic/tampi+isend+oss+task";
nodes = 16;
totalTasks = ntasksPerNode * nodes; totalTasks = ntasksPerNode * nodes;
sizePerCpu = { x=2; y=2; z=128 / totalTasks; }; sizePerCpu = { x = 2; y = 2; z = 4 * sizeFactor; };
sizePerTask = getSizePerTask cpusPerTask sizePerCpu; sizePerTask = getSizePerTask cpusPerTask sizePerCpu;
nprocs = { x=1; y=1; z=totalTasks; }; nprocs = { x=1; y=1; z=totalTasks; };
blocksPerCpu = 4;
nblocks = blocksPerCpu * cpusPerTask; nblocks = blocksPerCpu * cpusPerTask;
ncomms = 1; ncomms = 1;
disableAspectRatio = true; disableAspectRatio = true;
# Repeat the execution of each unit several times # Repeat the execution of each unit several times
loops = 10; loops = 5;
# Resources # Resources
qos = "debug"; qos = "debug";

View File

@ -47,25 +47,10 @@
}; };
hpcg = rec { hpcg = rec {
#serial = callPackage ./hpcg/serial.nix { }; granularity = callPackage ./hpcg/granularity.nix { };
#mpi = callPackage ./hpcg/mpi.nix { }; ss = callPackage ./hpcg/scaling.nix { };
#omp = callPackage ./hpcg/omp.nix { }; ws = ss.override { enableStrong=false; };
#mpi_omp = callPackage ./hpcg/mpi+omp.nix { }; size = callPackage ./hpcg/size.nix { };
genInput = callPackage ./hpcg/gen.nix { };
oss = callPackage ./hpcg/oss.nix {
inherit genInput;
};
ossGranularity = callPackage ./hpcg/oss.granularity.192.nix {
inherit genInput;
};
ossSlicesWeakscaling = callPackage ./hpcg/oss.slices.weakscaling.nix {
inherit genInput;
};
ss = callPackage ./hpcg/ss.nix { };
big.ss = ss.override { enableExtended = true; }; big.ss = ss.override { enableExtended = true; };
}; };