creams: merge similar experiments together

Large experiments have the enableExtended parameter disabled by default,
which enables more tests.
This commit is contained in:
Rodrigo Arias 2021-03-30 15:55:57 +02:00
parent ec056d97e5
commit 87f751185c
10 changed files with 258 additions and 801 deletions

View File

@ -1,114 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=1 ; nprocz=2 ; granul=256; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul=128; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul=64; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul=32; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul= 9; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul= 5; time= "02:00:00"; }
{ nodes=1 ; nprocz=2 ; granul= 4; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node1";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,114 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=16 ; nprocz=32 ; granul=64; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul=32; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul=16; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 9; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 5; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 4; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 2; time= "02:00:00"; }
{ nodes=16 ; nprocz=32 ; granul= 1; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node16";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,114 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=2 ; nprocz=4 ; granul=256; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=128; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=64; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=32; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul= 9; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul= 5; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul= 4; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node2";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,114 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=4 ; nprocz=8 ; granul=64; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul=32; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul=16; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul= 9; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul= 5; time= "02:00:00"; }
{ nodes=4 ; nprocz=4 ; granul= 4; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul= 2; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul= 1; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node4";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,114 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=8 ; nprocz=16 ; granul=64; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul=32; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul=16; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul= 9; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul= 5; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul= 4; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul= 2; time= "02:00:00"; }
{ nodes=8 ; nprocz=16 ; granul= 1; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-gran-node8";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -0,0 +1,125 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
, garlicTools
, enableExtended ? false
}:
with stdenv.lib;
with garlicTools;
let
# Initial variable configuration
varConf = {
granul = range2 4 128;
gitBranch = [
"garlic/tampi+isend+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+send+seq"
] ++ optionals (enableExtended) [
#"garlic/mpi+send+omp+fork" # Don't use fork for granularity
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+oss+task"
];
# Max. number of iterations
iterations = [ 10 20 ];
nodes = [ 1 ] ++ optionals (enableExtended) (range2 2 16);
};
# We use these auxiliary functions to assign different configurations
# depending on the git branch.
getGranul = branch: oldGranul:
if (branch == "garlic/mpi+send+seq")
then 999999 else oldGranul;
getCpusPerTask = branch: hw:
if (branch == "garlic/mpi+send+seq")
then 1 else hw.cpusPerSocket;
getNtasksPerNode = branch: hw:
if (branch == "garlic/mpi+send+seq")
then hw.cpusPerNode else hw.socketsPerNode;
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = "creams-gran";
unitName = "${expName}"+
"-nodes${toString nodes}"+
"-granul${toString granul}"+
"-${gitBranch}";
inherit (targetMachine.config) hw;
# Options for creams
inherit (c) gitBranch nodes iterations;
granul = getGranul gitBranch c.granul;
nprocz = ntasksPerNode * nodes;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
time = "02:00:00";
ntasksPerNode = getNtasksPerNode gitBranch hw;
cpusPerTask = getCpusPerTask gitBranch hw;
jobName = unitName;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stdexp.stdStages.srun {
inherit nextStage conf;
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
sed -i '/maximum number of iterations/s/50/${toString conf.iterations}/' input.dat
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: bsc.apps.creams.override {
inherit (conf) gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
# Replace the stdandard srun stage with our own
overrides = { srun = customSrun; };
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,112 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul=9 ; time= "02:00:00"; }
{ nodes=8 ; nprocz=16; granul=9 ; time= "02:00:00"; }
{ nodes=16; nprocz=32; granul=9 ; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+omp+fork"
"garlic/mpi+send+omp+task"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
"garlic/tampi+isend+oss+task"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-ss-hybrid";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,107 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = {
input = [
{ nodes=1 ; nprocz=2 ; granul=999999; time= "02:00:00"; }
{ nodes=2 ; nprocz=4 ; granul=999999; time= "02:00:00"; }
{ nodes=4 ; nprocz=8 ; granul=999999; time= "02:00:00"; }
{ nodes=8 ; nprocz=16; granul=999999; time= "02:00:00"; }
{ nodes=16; nprocz=32; granul=999999; time= "02:00:00"; }
];
gitBranch = [
"garlic/mpi+send+seq"
];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "creams-ss-pure";
inherit (targetMachine.config) hw;
# Options for creams
cc = icc;
mpi = impi;
inherit (c.input) granul time nodes;
inherit (c) gitBranch;
unitName = "${expName}-${toString nodes}-${gitBranch}";
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
ntasksPerNode = hw.cpusPerNode;
cpusPerTask = 1;
jobName = unitName;
nprocz = ntasksPerNode * nodes;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stages.srun {
# These are part of the stdndard srun stage:
inherit (conf) nixPrefix;
inherit nextStage;
cpuBind = "cores,verbose";
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.creams.override {
inherit cc mpi gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
overrides = {
# Replace the stdandard srun stage with our own
srun = customSrun;
};
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

125
garlic/exp/creams/ss.nix Normal file
View File

@ -0,0 +1,125 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
, garlicTools
, enableExtended ? false
}:
with stdenv.lib;
with garlicTools;
let
# Initial variable configuration
varConf = {
nodes = range2 1 16;
granul = [ 16 ] ++ optionals (enableExtended) [ 8 32 ];
# Max. number of iterations
iterations = [ 20 ] ++ optionals (enableExtended) [ 10 ];
gitBranch = [
"garlic/tampi+isend+oss+task"
"garlic/mpi+send+omp+task"
"garlic/mpi+send+seq"
] ++ optionals (enableExtended) [
"garlic/mpi+send+omp+fork"
"garlic/mpi+send+oss+task"
"garlic/mpi+isend+omp+task"
"garlic/mpi+isend+oss+task"
];
};
# We use these auxiliary functions to assign different configurations
# depending on the git branch.
getGranul = branch: oldGranul:
if (branch == "garlic/mpi+send+seq")
then 999999 else oldGranul;
getCpusPerTask = branch: hw:
if (branch == "garlic/mpi+send+seq")
then 1 else hw.cpusPerSocket;
getNtasksPerNode = branch: hw:
if (branch == "garlic/mpi+send+seq")
then hw.cpusPerNode else hw.socketsPerNode;
# Generate the complete configuration for each unit
genConf = c: targetMachine.config // rec {
expName = "creams-ss";
unitName = "${expName}"+
"-nodes${toString nodes}"+
"-granul${toString granul}"+
"-${gitBranch}";
inherit (targetMachine.config) hw;
# Options for creams
inherit (c) iterations gitBranch nodes;
granul = getGranul gitBranch c.granul;
nprocz = ntasksPerNode * nodes;
# Repeat the execution of each unit 10 times
loops = 10;
# Resources
qos = "debug";
time = "02:00:00";
ntasksPerNode = getNtasksPerNode gitBranch hw;
cpusPerTask = getCpusPerTask gitBranch hw;
jobName = unitName;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Custom srun stage to copy the creams input dataset
customSrun = {nextStage, conf, ...}:
let
input = bsc.garlic.apps.creamsInput.override {
inherit (conf) gitBranch granul nprocz;
};
in
stdexp.stdStages.srun {
inherit nextStage conf;
# Now we add some commands to execute before calling srun. These will
# only run in one rank (the first in the list of allocated nodes)
preSrun = ''
cp -r ${input}/SodTubeBenchmark/* .
chmod +w -R .
sed -i '/maximum number of iterations/s/50/${toString conf.iterations}/' input.dat
rm -f nanos6.toml
'';
};
exec = {nextStage, conf, ...}: stages.exec {
inherit nextStage;
env = ''
export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions"
'';
# Remove restarts as is not needed and is huge
post = ''
rm -rf restarts || true
'';
};
# Creams program
creams = {nextStage, conf, ...}: bsc.apps.creams.override {
inherit (conf) gitBranch;
};
pipeline = stdexp.stdPipelineOverride {
# Replace the stdandard srun stage with our own
overrides = { srun = customSrun; };
} ++ [ exec creams ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -36,18 +36,14 @@
granularity = callPackage ./saiph/granularity.nix { };
};
creams = {
ss = {
pure = callPackage ./creams/ss+pure.nix { };
hybrid = callPackage ./creams/ss+hybrid.nix { };
};
gran = {
node1 = callPackage ./creams/gran+node1.nix { };
node2 = callPackage ./creams/gran+node2.nix { };
node4 = callPackage ./creams/gran+node4.nix { };
node8 = callPackage ./creams/gran+node8.nix { };
node16 = callPackage ./creams/gran+node16.nix { };
};
creams = rec {
ss = callPackage ./creams/ss.nix { };
granularity = callPackage ./creams/granularity.nix { };
# These experiments are the extended versions of the previous
# ones. We split them so we can keep a reasonable execution time
big.granularity = granularity.override { enableExtended = true; };
big.ss = granularity.override { enableExtended = true; };
};
hpcg = rec {