fwi: add strong scalability tests
This commit is contained in:
parent
aadce016e1
commit
3ef4a505d3
@ -15,8 +15,8 @@ let
|
|||||||
# Initial variable configuration
|
# Initial variable configuration
|
||||||
varConf = {
|
varConf = {
|
||||||
gitBranch = [
|
gitBranch = [
|
||||||
# "garlic/tampi+send+oss+task"
|
"garlic/tampi+send+oss+task"
|
||||||
# "garlic/mpi+send+omp+task"
|
"garlic/mpi+send+omp+task"
|
||||||
"garlic/mpi+send+oss+task"
|
"garlic/mpi+send+oss+task"
|
||||||
# "garlic/mpi+send+seq"
|
# "garlic/mpi+send+seq"
|
||||||
# "garlic/oss+task"
|
# "garlic/oss+task"
|
||||||
@ -25,10 +25,8 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
blocksize = [ 1 2 4 8 16 32 ];
|
blocksize = [ 1 2 4 8 16 32 ];
|
||||||
#blocksize = [ 1 2 4 8 ];
|
|
||||||
|
|
||||||
n = [
|
n = [
|
||||||
#{nx=500; nz=500; ny=1000; ntpn=1; nn=1;}
|
|
||||||
{nx=500; nz=500; ny=2000; ntpn=2; nn=1;}
|
{nx=500; nz=500; ny=2000; ntpn=2; nn=1;}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
138
garlic/exp/fwi/memory_affinity.nix
Normal file
138
garlic/exp/fwi/memory_affinity.nix
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (targetMachine) fs;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = {
|
||||||
|
gitBranch = [
|
||||||
|
# "garlic/tampi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+omp+task"
|
||||||
|
"garlic/mpi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+seq"
|
||||||
|
# "garlic/oss+task"
|
||||||
|
# "garlic/omp+task"
|
||||||
|
# "garlic/seq"
|
||||||
|
];
|
||||||
|
|
||||||
|
blocksize = [ 1 ];
|
||||||
|
|
||||||
|
n = [
|
||||||
|
# {nx=500; nz=500; ny=8000;}
|
||||||
|
{nx=500; nz=500; ny=2000;}
|
||||||
|
];
|
||||||
|
|
||||||
|
nodes = [ 1 ]
|
||||||
|
|
||||||
|
numactl = [ true false ]
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# The c value contains something like:
|
||||||
|
# {
|
||||||
|
# n = { nx=500; ny=500; nz=500; }
|
||||||
|
# blocksize = 1;
|
||||||
|
# gitBranch = "garlic/tampi+send+oss+task";
|
||||||
|
# }
|
||||||
|
|
||||||
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
expName = "fwi";
|
||||||
|
unitName = "${expName}-test";
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
cc = icc;
|
||||||
|
inherit (c) gitBranch blocksize;
|
||||||
|
useNumactl = c.numactl
|
||||||
|
|
||||||
|
#nx = c.n.nx;
|
||||||
|
#ny = c.n.ny;
|
||||||
|
#nz = c.n.nz;
|
||||||
|
|
||||||
|
# Same but shorter:
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Other FWI parameters
|
||||||
|
ioFreq = -1;
|
||||||
|
|
||||||
|
# Repeat the execution of each unit several times
|
||||||
|
loops = 10;
|
||||||
|
#loops = 1;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
cpusPerTask = if (useNumactl) then hw.cpusPerNode else hw.cpusPerSocket;
|
||||||
|
ntasksPerNode = hw.cpusPerNode / cpusPerTask;
|
||||||
|
nodes = c.nodes;
|
||||||
|
qos = "debug";
|
||||||
|
time = "02:00:00";
|
||||||
|
jobName = unitName;
|
||||||
|
|
||||||
|
tracing = "no";
|
||||||
|
|
||||||
|
# Enable permissions to write in the local storage
|
||||||
|
extraMounts = [ fs.local.temp ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: stages.exec ({
|
||||||
|
inherit nextStage;
|
||||||
|
pre = ''
|
||||||
|
CDIR=$PWD
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
||||||
|
fi
|
||||||
|
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
||||||
|
mkdir -p $EXECDIR
|
||||||
|
cd $EXECDIR
|
||||||
|
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
||||||
|
'';
|
||||||
|
argv = [
|
||||||
|
"${conf.fwiInput}/fwi_params.txt"
|
||||||
|
"${conf.fwiInput}/fwi_frequencies.txt"
|
||||||
|
conf.blocksize
|
||||||
|
"-1" # Fordward steps
|
||||||
|
"-1" # Backward steps
|
||||||
|
conf.ioFreq # Write/read frequency
|
||||||
|
];
|
||||||
|
post = ''
|
||||||
|
rm -rf Results || true
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
mv trace_* $CDIR
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
} // optionalAttrs (conf.useNumact) {
|
||||||
|
program = "${numactl}/bin/numactl --interleave=all ${stageProgram nextStage}";
|
||||||
|
});
|
||||||
|
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
|
|
||||||
|
# FWI program
|
||||||
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
||||||
|
inherit (conf) cc gitBranch fwiInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
132
garlic/exp/fwi/strong_scaling_forkjoin.nix
Normal file
132
garlic/exp/fwi/strong_scaling_forkjoin.nix
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (targetMachine) fs;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = {
|
||||||
|
gitBranch = [
|
||||||
|
# "garlic/tampi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+omp+task"
|
||||||
|
# "garlic/mpi+send+oss+task"
|
||||||
|
"garlic/mpi+send+omp+fork"
|
||||||
|
# "garlic/mpi+send+seq"
|
||||||
|
# "garlic/oss+task"
|
||||||
|
# "garlic/omp+task"
|
||||||
|
# "garlic/seq"
|
||||||
|
];
|
||||||
|
|
||||||
|
blocksize = [ 0 ];
|
||||||
|
|
||||||
|
n = [
|
||||||
|
{nx=500; nz=500; ny=16000;}
|
||||||
|
];
|
||||||
|
|
||||||
|
nodes = [ 1 2 4 8 16 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# The c value contains something like:
|
||||||
|
# {
|
||||||
|
# n = { nx=500; ny=500; nz=500; }
|
||||||
|
# blocksize = 1;
|
||||||
|
# gitBranch = "garlic/tampi+send+oss+task";
|
||||||
|
# }
|
||||||
|
|
||||||
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
expName = "fwi";
|
||||||
|
unitName = "${expName}-test";
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
cc = icc;
|
||||||
|
inherit (c) gitBranch blocksize;
|
||||||
|
|
||||||
|
#nx = c.n.nx;
|
||||||
|
#ny = c.n.ny;
|
||||||
|
#nz = c.n.nz;
|
||||||
|
|
||||||
|
# Same but shorter:
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Other FWI parameters
|
||||||
|
ioFreq = -1;
|
||||||
|
|
||||||
|
# Repeat the execution of each unit several times
|
||||||
|
loops = 10;
|
||||||
|
#loops = 1;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
cpusPerTask = hw.cpusPerSocket;
|
||||||
|
ntasksPerNode = 2;
|
||||||
|
nodes = c.nodes;
|
||||||
|
qos = "debug";
|
||||||
|
time = "02:00:00";
|
||||||
|
jobName = unitName;
|
||||||
|
|
||||||
|
tracing = "no";
|
||||||
|
|
||||||
|
# Enable permissions to write in the local storage
|
||||||
|
extraMounts = [ fs.local.temp ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
pre = ''
|
||||||
|
CDIR=$PWD
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
||||||
|
fi
|
||||||
|
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
||||||
|
mkdir -p $EXECDIR
|
||||||
|
cd $EXECDIR
|
||||||
|
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
||||||
|
'';
|
||||||
|
argv = [
|
||||||
|
"${conf.fwiInput}/fwi_params.txt"
|
||||||
|
"${conf.fwiInput}/fwi_frequencies.txt"
|
||||||
|
"-1" # Fordward steps
|
||||||
|
"-1" # Backward steps
|
||||||
|
conf.ioFreq # Write/read frequency
|
||||||
|
];
|
||||||
|
post = ''
|
||||||
|
rm -rf Results || true
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
mv trace_* $CDIR
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
|
|
||||||
|
# FWI program
|
||||||
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
||||||
|
inherit (conf) cc gitBranch fwiInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
134
garlic/exp/fwi/strong_scaling_io.nix
Normal file
134
garlic/exp/fwi/strong_scaling_io.nix
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (targetMachine) fs;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = {
|
||||||
|
gitBranch = [
|
||||||
|
"garlic/tampi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+omp+task"
|
||||||
|
# "garlic/mpi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+seq"
|
||||||
|
# "garlic/oss+task"
|
||||||
|
# "garlic/omp+task"
|
||||||
|
# "garlic/seq"
|
||||||
|
];
|
||||||
|
|
||||||
|
blocksize = [ 1 2 4 8 ];
|
||||||
|
|
||||||
|
n = [
|
||||||
|
{nx=500; nz=500; ny=16000;}
|
||||||
|
];
|
||||||
|
|
||||||
|
nodes = [ 1 2 4 8 16 ];
|
||||||
|
|
||||||
|
ioFreq = [ 9999 (-1) ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# The c value contains something like:
|
||||||
|
# {
|
||||||
|
# n = { nx=500; ny=500; nz=500; }
|
||||||
|
# blocksize = 1;
|
||||||
|
# gitBranch = "garlic/tampi+send+oss+task";
|
||||||
|
# }
|
||||||
|
|
||||||
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
expName = "fwi";
|
||||||
|
unitName = "${expName}-test";
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
cc = icc;
|
||||||
|
inherit (c) gitBranch blocksize;
|
||||||
|
|
||||||
|
#nx = c.n.nx;
|
||||||
|
#ny = c.n.ny;
|
||||||
|
#nz = c.n.nz;
|
||||||
|
|
||||||
|
# Same but shorter:
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Other FWI parameters
|
||||||
|
ioFreq = c.ioFreq;
|
||||||
|
|
||||||
|
# Repeat the execution of each unit several times
|
||||||
|
loops = 10;
|
||||||
|
#loops = 1;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
cpusPerTask = hw.cpusPerSocket;
|
||||||
|
ntasksPerNode = 2;
|
||||||
|
nodes = c.nodes;
|
||||||
|
qos = "debug";
|
||||||
|
time = "02:00:00";
|
||||||
|
jobName = unitName;
|
||||||
|
|
||||||
|
tracing = "no";
|
||||||
|
|
||||||
|
# Enable permissions to write in the local storage
|
||||||
|
extraMounts = [ fs.local.temp ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
pre = ''
|
||||||
|
CDIR=$PWD
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
||||||
|
fi
|
||||||
|
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
||||||
|
mkdir -p $EXECDIR
|
||||||
|
cd $EXECDIR
|
||||||
|
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
||||||
|
'';
|
||||||
|
argv = [
|
||||||
|
"${conf.fwiInput}/fwi_params.txt"
|
||||||
|
"${conf.fwiInput}/fwi_frequencies.txt"
|
||||||
|
conf.blocksize
|
||||||
|
"-1" # Fordward steps
|
||||||
|
"-1" # Backward steps
|
||||||
|
conf.ioFreq # Write/read frequency
|
||||||
|
];
|
||||||
|
post = ''
|
||||||
|
rm -rf Results || true
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
mv trace_* $CDIR
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
|
|
||||||
|
# FWI program
|
||||||
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
||||||
|
inherit (conf) cc gitBranch fwiInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
133
garlic/exp/fwi/strong_scaling_mpionly.nix
Normal file
133
garlic/exp/fwi/strong_scaling_mpionly.nix
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (targetMachine) fs;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = {
|
||||||
|
gitBranch = [
|
||||||
|
# "garlic/tampi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+omp+task"
|
||||||
|
# "garlic/mpi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+omp+fork"
|
||||||
|
"garlic/mpi+send+seq"
|
||||||
|
# "garlic/oss+task"
|
||||||
|
# "garlic/omp+task"
|
||||||
|
# "garlic/seq"
|
||||||
|
];
|
||||||
|
|
||||||
|
blocksize = [ 0 ];
|
||||||
|
|
||||||
|
n = [
|
||||||
|
{nx=500; nz=500; ny=16000;}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Not enough planes for 8 and 16 nodes
|
||||||
|
nodes = [ 1 2 4 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# The c value contains something like:
|
||||||
|
# {
|
||||||
|
# n = { nx=500; ny=500; nz=500; }
|
||||||
|
# blocksize = 1;
|
||||||
|
# gitBranch = "garlic/tampi+send+oss+task";
|
||||||
|
# }
|
||||||
|
|
||||||
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
expName = "fwi";
|
||||||
|
unitName = "${expName}-test";
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
cc = icc;
|
||||||
|
inherit (c) gitBranch blocksize;
|
||||||
|
|
||||||
|
#nx = c.n.nx;
|
||||||
|
#ny = c.n.ny;
|
||||||
|
#nz = c.n.nz;
|
||||||
|
|
||||||
|
# Same but shorter:
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Other FWI parameters
|
||||||
|
ioFreq = -1;
|
||||||
|
|
||||||
|
# Repeat the execution of each unit several times
|
||||||
|
loops = 10;
|
||||||
|
#loops = 1;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
cpusPerTask = 1;
|
||||||
|
ntasksPerNode = hw.cpusPerNode;
|
||||||
|
nodes = c.nodes;
|
||||||
|
qos = "debug";
|
||||||
|
time = "02:00:00";
|
||||||
|
jobName = unitName;
|
||||||
|
|
||||||
|
tracing = "no";
|
||||||
|
|
||||||
|
# Enable permissions to write in the local storage
|
||||||
|
extraMounts = [ fs.local.temp ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
pre = ''
|
||||||
|
CDIR=$PWD
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
||||||
|
fi
|
||||||
|
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
||||||
|
mkdir -p $EXECDIR
|
||||||
|
cd $EXECDIR
|
||||||
|
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
||||||
|
'';
|
||||||
|
argv = [
|
||||||
|
"${conf.fwiInput}/fwi_params.txt"
|
||||||
|
"${conf.fwiInput}/fwi_frequencies.txt"
|
||||||
|
"-1" # Fordward steps
|
||||||
|
"-1" # Backward steps
|
||||||
|
conf.ioFreq # Write/read frequency
|
||||||
|
];
|
||||||
|
post = ''
|
||||||
|
rm -rf Results || true
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
mv trace_* $CDIR
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
|
|
||||||
|
# FWI program
|
||||||
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
||||||
|
inherit (conf) cc gitBranch fwiInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
132
garlic/exp/fwi/strong_scaling_task.nix
Normal file
132
garlic/exp/fwi/strong_scaling_task.nix
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, stdexp
|
||||||
|
, bsc
|
||||||
|
, targetMachine
|
||||||
|
, stages
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (targetMachine) fs;
|
||||||
|
|
||||||
|
# Initial variable configuration
|
||||||
|
varConf = {
|
||||||
|
gitBranch = [
|
||||||
|
"garlic/tampi+send+oss+task"
|
||||||
|
"garlic/mpi+send+omp+task"
|
||||||
|
"garlic/mpi+send+oss+task"
|
||||||
|
# "garlic/mpi+send+seq"
|
||||||
|
# "garlic/oss+task"
|
||||||
|
# "garlic/omp+task"
|
||||||
|
# "garlic/seq"
|
||||||
|
];
|
||||||
|
|
||||||
|
blocksize = [ 1 2 4 8 ];
|
||||||
|
|
||||||
|
n = [
|
||||||
|
{nx=500; nz=500; ny=16000;}
|
||||||
|
];
|
||||||
|
|
||||||
|
nodes = [ 1 2 4 8 16 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# The c value contains something like:
|
||||||
|
# {
|
||||||
|
# n = { nx=500; ny=500; nz=500; }
|
||||||
|
# blocksize = 1;
|
||||||
|
# gitBranch = "garlic/tampi+send+oss+task";
|
||||||
|
# }
|
||||||
|
|
||||||
|
machineConfig = targetMachine.config;
|
||||||
|
|
||||||
|
# Generate the complete configuration for each unit
|
||||||
|
genConf = with bsc; c: targetMachine.config // rec {
|
||||||
|
expName = "fwi";
|
||||||
|
unitName = "${expName}-test";
|
||||||
|
inherit (machineConfig) hw;
|
||||||
|
|
||||||
|
cc = icc;
|
||||||
|
inherit (c) gitBranch blocksize;
|
||||||
|
|
||||||
|
#nx = c.n.nx;
|
||||||
|
#ny = c.n.ny;
|
||||||
|
#nz = c.n.nz;
|
||||||
|
|
||||||
|
# Same but shorter:
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
|
||||||
|
fwiInput = bsc.apps.fwi.input.override {
|
||||||
|
inherit (c.n) nx ny nz;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Other FWI parameters
|
||||||
|
ioFreq = -1;
|
||||||
|
|
||||||
|
# Repeat the execution of each unit several times
|
||||||
|
loops = 10;
|
||||||
|
#loops = 1;
|
||||||
|
|
||||||
|
# Resources
|
||||||
|
cpusPerTask = hw.cpusPerSocket;
|
||||||
|
ntasksPerNode = 2;
|
||||||
|
nodes = c.nodes;
|
||||||
|
qos = "debug";
|
||||||
|
time = "02:00:00";
|
||||||
|
jobName = unitName;
|
||||||
|
|
||||||
|
tracing = "no";
|
||||||
|
|
||||||
|
# Enable permissions to write in the local storage
|
||||||
|
extraMounts = [ fs.local.temp ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Compute the array of configurations
|
||||||
|
configs = stdexp.buildConfigs {
|
||||||
|
inherit varConf genConf;
|
||||||
|
};
|
||||||
|
|
||||||
|
exec = {nextStage, conf, ...}: stages.exec {
|
||||||
|
inherit nextStage;
|
||||||
|
pre = ''
|
||||||
|
CDIR=$PWD
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf"
|
||||||
|
fi
|
||||||
|
EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN"
|
||||||
|
mkdir -p $EXECDIR
|
||||||
|
cd $EXECDIR
|
||||||
|
ln -fs ${conf.fwiInput}/InputModels InputModels || true
|
||||||
|
'';
|
||||||
|
argv = [
|
||||||
|
"${conf.fwiInput}/fwi_params.txt"
|
||||||
|
"${conf.fwiInput}/fwi_frequencies.txt"
|
||||||
|
conf.blocksize
|
||||||
|
"-1" # Fordward steps
|
||||||
|
"-1" # Backward steps
|
||||||
|
conf.ioFreq # Write/read frequency
|
||||||
|
];
|
||||||
|
post = ''
|
||||||
|
rm -rf Results || true
|
||||||
|
if [[ "${conf.tracing}" == "yes" ]]; then
|
||||||
|
mv trace_* $CDIR
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
apps = bsc.garlic.apps;
|
||||||
|
|
||||||
|
# FWI program
|
||||||
|
program = {nextStage, conf, ...}: apps.fwi.solver.override {
|
||||||
|
inherit (conf) cc gitBranch fwiInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
pipeline = stdexp.stdPipeline ++ [ exec program ];
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdexp.genExperiment { inherit configs pipeline; }
|
@ -16,16 +16,16 @@ let
|
|||||||
varConf = {
|
varConf = {
|
||||||
gitBranch = [
|
gitBranch = [
|
||||||
# "garlic/tampi+send+oss+task"
|
# "garlic/tampi+send+oss+task"
|
||||||
# "garlic/mpi+send+omp+task"
|
"garlic/mpi+send+omp+task"
|
||||||
"garlic/mpi+send+oss+task"
|
# "garlic/mpi+send+oss+task"
|
||||||
# "garlic/mpi+send+seq"
|
# "garlic/mpi+send+seq"
|
||||||
# "garlic/oss+task"
|
# "garlic/oss+task"
|
||||||
# "garlic/omp+task"
|
# "garlic/omp+task"
|
||||||
# "garlic/seq"
|
# "garlic/seq"
|
||||||
];
|
];
|
||||||
|
|
||||||
#blocksize = [ 1 2 4 8 16 32 ];
|
blocksize = [ 1 2 4 8 16 32 ];
|
||||||
blocksize = [ 1 2 4 8 ];
|
#blocksize = [ 1 2 4 8 ];
|
||||||
|
|
||||||
n = [
|
n = [
|
||||||
#{nx=500; nz=500; ny=1000; ntpn=1; nn=1;}
|
#{nx=500; nz=500; ny=1000; ntpn=1; nn=1;}
|
||||||
|
@ -98,7 +98,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fwi = {
|
fwi = {
|
||||||
test = callPackage ./fwi/test.nix { };
|
test = callPackage ./fwi/test.nix { };
|
||||||
|
strong_scaling_task = callPackage ./fwi/strong_scaling_task.nix { };
|
||||||
|
strong_scaling_forkjoin = callPackage ./fwi/strong_scaling_forkjoin.nix { };
|
||||||
|
strong_scaling_mpionly = callPackage ./fwi/strong_scaling_mpionly.nix { };
|
||||||
|
strong_scaling_io = callPackage ./fwi/strong_scaling_io.nix { };
|
||||||
|
granularity = callPackage ./fwi/granularity.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
osu = rec {
|
osu = rec {
|
||||||
|
70
garlic/fig/fwi/granularity.R
Normal file
70
garlic/fig/fwi/granularity.R
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(dplyr)
|
||||||
|
library(scales)
|
||||||
|
library(jsonlite)
|
||||||
|
|
||||||
|
args=commandArgs(trailingOnly=TRUE)
|
||||||
|
|
||||||
|
# Read the timetable from args[1]
|
||||||
|
input_file = "input.json"
|
||||||
|
if (length(args)>0) { input_file = args[1] }
|
||||||
|
|
||||||
|
# Load the dataset in NDJSON format
|
||||||
|
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||||
|
jsonlite::flatten()
|
||||||
|
|
||||||
|
# We only need the nblocks and time
|
||||||
|
df = select(dataset, config.blocksize, config.gitBranch, time) %>%
|
||||||
|
rename(blocksize=config.blocksize, gitBranch=config.gitBranch) %>%
|
||||||
|
group_by(blocksize, gitBranch) %>%
|
||||||
|
mutate(mtime = median(time)) %>%
|
||||||
|
ungroup()
|
||||||
|
|
||||||
|
df$gitBranch = as.factor(df$gitBranch)
|
||||||
|
df$blocksize = as.factor(df$blocksize)
|
||||||
|
|
||||||
|
ppi=300
|
||||||
|
h=5
|
||||||
|
w=5
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line Graph
|
||||||
|
####################################################################
|
||||||
|
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
## Create the plot with the normalized time vs nblocks
|
||||||
|
p = ggplot(df, aes(x = blocksize, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Blocksize", y="Median Time (s)", title="FWI granularity",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Boxplot
|
||||||
|
####################################################################
|
||||||
|
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
# Create the plot with the normalized time vs nblocks
|
||||||
|
p = ggplot(df, aes(x=blocksize, y=time, group=gitBranch, colour=gitBranch)) +
|
||||||
|
# Labels
|
||||||
|
labs(x="Blocksize", y="Normalized time",
|
||||||
|
title=sprintf("FWI Time"),
|
||||||
|
subtitle=input_file) +
|
||||||
|
# Draw boxplots
|
||||||
|
geom_boxplot() +
|
||||||
|
theme_bw() +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
## Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
120
garlic/fig/fwi/strong_scaling.R
Normal file
120
garlic/fig/fwi/strong_scaling.R
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(dplyr)
|
||||||
|
library(scales)
|
||||||
|
library(jsonlite)
|
||||||
|
|
||||||
|
args=commandArgs(trailingOnly=TRUE)
|
||||||
|
|
||||||
|
# Read the timetable from args[1]
|
||||||
|
input_file = "input.json"
|
||||||
|
if (length(args)>0) { input_file = args[1] }
|
||||||
|
|
||||||
|
# Load the dataset in NDJSON format
|
||||||
|
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||||
|
jsonlite::flatten()
|
||||||
|
|
||||||
|
# Select block size to display
|
||||||
|
useBlocksize = 1
|
||||||
|
|
||||||
|
# We only need the nblocks and time
|
||||||
|
df = select(dataset, config.blocksize, config.gitBranch, config.nodes, time) %>%
|
||||||
|
rename(
|
||||||
|
blocksize=config.blocksize,
|
||||||
|
gitBranch=config.gitBranch,
|
||||||
|
nodes=config.nodes
|
||||||
|
) %>%
|
||||||
|
filter(blocksize == useBlocksize | blocksize == 0) %>%
|
||||||
|
group_by(nodes, gitBranch) %>%
|
||||||
|
mutate(mtime = median(time)) %>%
|
||||||
|
mutate(nxmtime = mtime * nodes) %>%
|
||||||
|
mutate(nxtime = time * nodes) %>%
|
||||||
|
ungroup()
|
||||||
|
|
||||||
|
df$gitBranch = as.factor(df$gitBranch)
|
||||||
|
df$blocksize = as.factor(df$blocksize)
|
||||||
|
df$nodes = as.factor(df$nodes)
|
||||||
|
|
||||||
|
ppi=300
|
||||||
|
h=5
|
||||||
|
w=5
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (time)
|
||||||
|
####################################################################
|
||||||
|
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=time, group=gitBranch, color=gitBranch)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Time (s)", title="FWI strong scaling",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.6, 0.75))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (timei x nodes)
|
||||||
|
####################################################################
|
||||||
|
png("nxtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=nxtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.15, 0.80)) +
|
||||||
|
theme(legend.text = element_text(size = 7))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (median time)
|
||||||
|
####################################################################
|
||||||
|
png("mediantime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (nodes x median time)
|
||||||
|
####################################################################
|
||||||
|
png("nxmtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=nxmtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
122
garlic/fig/fwi/strong_scaling_io.R
Normal file
122
garlic/fig/fwi/strong_scaling_io.R
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
library(ggplot2)
|
||||||
|
library(dplyr)
|
||||||
|
library(scales)
|
||||||
|
library(jsonlite)
|
||||||
|
library(forcats)
|
||||||
|
|
||||||
|
args=commandArgs(trailingOnly=TRUE)
|
||||||
|
|
||||||
|
# Read the timetable from args[1]
|
||||||
|
input_file = "input.json"
|
||||||
|
if (length(args)>0) { input_file = args[1] }
|
||||||
|
|
||||||
|
# Load the dataset in NDJSON format
|
||||||
|
dataset = jsonlite::stream_in(file(input_file)) %>%
|
||||||
|
jsonlite::flatten()
|
||||||
|
|
||||||
|
# We only need the nblocks and time
|
||||||
|
df = select(dataset, config.blocksize, config.ioFreq, config.gitBranch, config.nodes, time) %>%
|
||||||
|
rename(
|
||||||
|
blocksize=config.blocksize,
|
||||||
|
io=config.ioFreq,
|
||||||
|
gitBranch=config.gitBranch,
|
||||||
|
nodes=config.nodes
|
||||||
|
) %>%
|
||||||
|
filter(blocksize == 1) %>%
|
||||||
|
group_by(nodes, gitBranch, io) %>%
|
||||||
|
mutate(mtime = median(time)) %>%
|
||||||
|
mutate(nxmtime = mtime * nodes) %>%
|
||||||
|
mutate(nxtime = time * nodes) %>%
|
||||||
|
ungroup()
|
||||||
|
|
||||||
|
df$gitBranch = as.factor(df$gitBranch)
|
||||||
|
df$io = as.factor(df$io)
|
||||||
|
df$blocksize = as.factor(df$blocksize)
|
||||||
|
df$nodes = as.factor(df$nodes)
|
||||||
|
|
||||||
|
df$io = fct_recode(df$io, enabled = "-1", disabled = "9999")
|
||||||
|
|
||||||
|
|
||||||
|
ppi=300
|
||||||
|
h=5
|
||||||
|
w=5
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (time)
|
||||||
|
####################################################################
|
||||||
|
png("time.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=time, group=io, color=io)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Time (s)", title="FWI strong scaling for mpi+send+oss+task",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
####################################################################
|
||||||
|
### Line plot (time x nodes)
|
||||||
|
####################################################################
|
||||||
|
png("nxtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
|
||||||
|
p = ggplot(df, aes(x=nodes, y=nxtime, group=io, color=io)) +
|
||||||
|
geom_point() +
|
||||||
|
geom_line() +
|
||||||
|
theme_bw() +
|
||||||
|
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling for mpi+send+oss+task",
|
||||||
|
subtitle=input_file) +
|
||||||
|
theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
theme(legend.position = c(0.5, 0.88))
|
||||||
|
|
||||||
|
# Render the plot
|
||||||
|
print(p)
|
||||||
|
|
||||||
|
# Save the png image
|
||||||
|
dev.off()
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
#### Line plot (median time)
|
||||||
|
#####################################################################
|
||||||
|
#png("mediantime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
#
|
||||||
|
#p = ggplot(df, aes(x=nodes, y=mtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
# geom_point() +
|
||||||
|
# geom_line() +
|
||||||
|
# theme_bw() +
|
||||||
|
# labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
|
||||||
|
# subtitle=input_file) +
|
||||||
|
# theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
# theme(legend.position = c(0.5, 0.88))
|
||||||
|
#
|
||||||
|
## Render the plot
|
||||||
|
#print(p)
|
||||||
|
#
|
||||||
|
## Save the png image
|
||||||
|
#dev.off()
|
||||||
|
#
|
||||||
|
#####################################################################
|
||||||
|
#### Line plot (nodes x median time)
|
||||||
|
#####################################################################
|
||||||
|
#png("nxmtime.png", width=w*ppi, height=h*ppi, res=ppi)
|
||||||
|
#
|
||||||
|
#p = ggplot(df, aes(x=nodes, y=nxmtime, group=gitBranch, color=gitBranch)) +
|
||||||
|
# geom_point() +
|
||||||
|
# geom_line() +
|
||||||
|
# theme_bw() +
|
||||||
|
# labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
|
||||||
|
# subtitle=input_file) +
|
||||||
|
# theme(plot.subtitle=element_text(size=8)) +
|
||||||
|
# theme(legend.position = c(0.5, 0.88))
|
||||||
|
#
|
||||||
|
## Render the plot
|
||||||
|
#print(p)
|
||||||
|
#
|
||||||
|
## Save the png image
|
||||||
|
#dev.off()
|
@ -62,7 +62,10 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
fwi = with exp.fwi; {
|
fwi = with exp.fwi; {
|
||||||
test = stdPlot ./fwi/test.R [ test ];
|
test = stdPlot ./fwi/test.R [ test ];
|
||||||
|
strong_scaling = stdPlot ./fwi/strong_scaling.R [ strong_scaling_task strong_scaling_forkjoin strong_scaling_mpionly ];
|
||||||
|
strong_scaling_io = stdPlot ./fwi/strong_scaling_io.R [ strong_scaling_io ];
|
||||||
|
granularity = stdPlot ./fwi/granularity.R [ granularity ];
|
||||||
};
|
};
|
||||||
|
|
||||||
osu = with exp.osu; {
|
osu = with exp.osu; {
|
||||||
|
Loading…
Reference in New Issue
Block a user