saiph: clean exps and figs

This commit is contained in:
Sandra 2021-03-24 09:08:34 +01:00 committed by Rodrigo Arias Mallo
parent 72e7a8dab7
commit b64b864194
30 changed files with 537 additions and 2384 deletions

View File

@ -32,15 +32,8 @@
};
saiph = {
numcomm = callPackage ./saiph/numcomm.nix { };
granularity = callPackage ./saiph/granularity.nix { };
scaling = callPackage ./saiph/scaling.nix { };
scaling2 = callPackage ./saiph/scaling2.nix { };
debug = callPackage ./saiph/debug.nix { };
blockingY = callPackage ./saiph/blocking_Y.nix { };
blockingZ = callPackage ./saiph/blocking_Z.nix { };
blockingYZ = callPackage ./saiph/blocking_YZ.nix { };
blockingZY = callPackage ./saiph/blocking_ZY.nix { };
granularity-saiph = callPackage ./saiph/granularity-saiph.nix { };
scalability-saiph = callPackage ./saiph/scalability-saiph.nix { };
};
creams = rec {

View File

@ -1,67 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 2 4 8 16 32 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.blocking";
unitName = "${expName}.1-nby-nbz-${toString nby}-${toString nbz}.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nby = c.nb;
nbz = c.nb;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "00:50:00";
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,68 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 1 2 4 8 16 32 64 128 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.blockingY";
unitName = "${expName}.nbx-nby-nbz-${toString nbx}-${toString nby}-${toString nbz}.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = c.nb;
nbz = 1;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "01:00:00";
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,68 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 4 8 16 32 64 128 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.blockingY";
unitName = "${expName}.nbx-nby-nbz-${toString nbx}-${toString nby}-${toString nbz}.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = 8;
nbz = c.nb;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "01:00:00";
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,68 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 1 2 4 8 16 32 64 128 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.blockingZ";
unitName = "${expName}.nbx-nby-nbz-${toString nbx}-${toString nby}-${toString nbz}.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = 1;
nbz = c.nb;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "01:00:00";
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,68 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 4 8 16 32 64 128 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.blockingZY";
unitName = "${expName}.nbx-nby-nbz-${toString nbx}-${toString nby}-${toString nbz}.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = c.nb;
nbz = 8;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "01:00:00";
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,89 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph";
unitName = "${expName}-debug";
# 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";
inherit (targetMachine.config) hw;
# saiph options
manualDist = 1;
nbgx = 1;
nbgy = 1;
nbgz = 8;
nblx = 1;
nbly = 4;
nblz = 96;
nbltotal = 384;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
gitCommit = "3fa116620f1c7fbd1127d785c8bdc5d2372837b3";
#gitCommit = c.gitCommit; # if exp involves more than 1 commit
#inherit (c) gitCommit; # if exp fixes the commit
# Repeat the execution of each unit 50 times
loops = 1;
# Resources
qos = "debug";
ntasksPerNode = hw.socketsPerNode;
nodes = 4;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}";
# Compile flags
debugFlags = 1;
asanFlags = 0;
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
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
'';
pre = ''
ulimit -c unlimited
'';
};
valgrind = {nextStage, ...}: stages.valgrind {
inherit nextStage;
};
program = {nextStage, conf, ...}:
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit (conf) manualDist nbgx nbgy nbgz nblx nbly nblz nbltotal mpi gitBranch gitCommit debugFlags asanFlags;
};
pipeline = stdexp.stdPipeline ++ [ exec valgrind program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -0,0 +1,109 @@
######################################################################################
# Saiph, granularity experiment:
#
# App:Heat 3D - garlic/tampi+isend+oss+task+simd branch
# App details:
# 3D mesh of ~400*400*400 points
# nbgx = global blocks in the X dimension
# nbgy = global blocks in the Y dimension
# nbgz = global blocks in the Z dimension
# --> nbgx*nbgy*nbgz = global distributed blocks
# nbly = local blocks in the Y dimension
# nblz = local blocks in the Z dimension
# --> nbly*nblz = local blocks (#tasks)
#
# Granularity experiment configuration:
# Single-core run
# MPI binded to sockets: MPI procs = 2
# Mesh distributed across third dimension to ensure contiguous communications
# --> nbgx = 1, nbgy = 1
# First dimension cannot be locally blocked (simd reasons)
# Second and third dimension local blocking limited by local mesh size
#
######################################################################################
# Common packages, tools and options
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
#*** Variable configurations ***
varConf = with bsc; {
# Local blocks per dimension
nbl1 = [ 1 2 3 4 6 12 24 48 96 ];
nbl2 = [ 1 2 3 4 6 12 24 48 96 ];
};
#*** Generate the complete configuration for each unit ***
genConf = with bsc; c: targetMachine.config // rec {
# Experiment, units and job names
expName = "saiph-granularity";
unitName = "${expName}-N${toString nodes}" + "nbg_${toString nbgx}-${toString nbgy}-${toString nbgz}" + "nbl_1-${toString nbly}-${toString nblz}";
jobName = "${unitName}";
# saiph options
nodes = 1;
enableManualDist = true; # allows to manually set nbg{x-y-z}
nbgx = 1;
nbgy = 1;
nbgz = nodes*2; # forcing distribution by last dim
nblx = 1; # simd reasons
nbly = c.nbl1; # takes values from varConf
nblz = c.nbl2; # takes values from varConf
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
gitCommit = "8052494d7dc62bef95ebaca9938e82fb029686f6"; # fix a specific commit
rev = "0";
# Repeat the execution of each unit 30 times
loops = 30;
# Resources
inherit (targetMachine.config) hw;
qos = "debug";
ntasksPerNode = hw.socketsPerNode; # MPI binded to sockets
cpusPerTask = hw.cpusPerSocket; # Using the 24 CPUs of each socket
};
#*** Compute the final set of configurations ***
# Compute the array of configurations: cartesian product of all factors
allConfigs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Filter to remove non-desired configurations:
# --> tasks/proc < 0.5
# --> nblz > 50
configs = filter (el: if ((builtins.mul el.nbly el.nblz) < (builtins.mul 0.5 el.cpusPerTask) || el.nblz > 50) then false else true) allConfigs;
#*** Sets the env/argv of the program ***
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export OMP_NUM_THREADS=${toString hw.cpusPerSocket}
'';
};
#*** Configure the program according to the app ***
program = {nextStage, conf, ...}:
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit (conf) enableManualDist nbgx nbgy nbgz nblx nbly nblz mpi gitBranch gitCommit;
};
#*** Add stages to the pipeline ***
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,70 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nb = [ 1 2 4 8 16 32 64 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.granularity";
unitName = "${expName}.nbx-nby-nbz-${toString nbx}-${toString nby}-${toString nbz}.nsteps-${nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = c.nb;
nbz = c.nb;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+omp+task+simd";
# Repeat the execution of each unit 30 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
qos = "debug";
time = "02:00:00";
ntasksPerNode = 1;
nodes = 1;
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
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, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,65 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
numComm = [ 1 2 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.numcomm";
unitName = "${expName}.nc-${toString numComm}";
inherit (targetMachine.config) hw;
# saiph options
inherit (c) numComm;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 100 times
loops = 100;
# Resources
qos = "debug";
time = "02:00:00";
ntasksPerNode = 2;
nodes = 1;
cpusPerTask = hw.cpusPerSocket;
jobName = "saiph-${toString numComm}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export OMP_NUM_THREADS=24
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit numComm mpi gitBranch;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -0,0 +1,113 @@
######################################################################################
# Saiph, scalability experiment:
#
# App:Heat 3D - garlic/tampi+isend+oss+task+simd branch
# App details:
# 3D mesh of ~400*400*400 points
# nbgx = global blocks in the X dimension
# nbgy = global blocks in the Y dimension
# nbgz = global blocks in the Z dimension
# --> nbgx*nbgy*nbgz = global distributed blocks
# nbly = local blocks in the Y dimension
# nblz = local blocks in the Z dimension
# --> nbly*nblz = local blocks (#tasks)
#
# Scalability experiment configuration:
# From a single-core granularity experiment, use a suited local blocking set:
# --> nbly*nblz >= 48 (at least 3tasks/proc)
# MPI binded to sockets: MPI procs = 2*nodes
# Mesh distributed across third dimension to ensure contiguous communications
# --> nbgx = 1, nbgy = 1
# Global distribution limited by global mesh size
# First dimension cannot be locally blocked (simd reasons)
# Second and third dimension local blocking limited by local mesh size
#
######################################################################################
# Common packages, tools and options
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
#*** Variable configurations ***
varConf = with bsc; {
# Local blocks per dimension
nbl1 = [ 1 2 3 4 6 12 24 48 96 ];
nbl2 = [ 1 2 3 4 6 12 24 48 96 ];
# Number of nodes
nodes = [ 1 2 4 8 ];
};
#*** Generate the complete configuration for each unit ***
genConf = with bsc; c: targetMachine.config // rec {
# Experiment, units and job names
expName = "saiph-scalability";
unitName = "${expName}-N${toString nodes}" + "nbg_${toString nbgx}-${toString nbgy}-${toString nbgz}" + "nbl_1-${toString nbly}-${toString nblz}";
jobName = "${unitName}";
# saiph options
nodes = c.nodes; # takes values from varConf
enableManualDist = true; # allows to manually set nbg{x-y-z}
nbgx = 1;
nbgy = 1;
nbgz = nodes*2; # forcing distribution by last dim
nblx = 1; # simd reasons
nbly = c.nbl1; # takes values from varConf
nblz = c.nbl2; # takes values from varConf
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
gitCommit = "8052494d7dc62bef95ebaca9938e82fb029686f6"; # fix a specific commit
rev = "0";
# Repeat the execution of each unit 30 times
loops = 30;
# Resources
inherit (targetMachine.config) hw;
qos = "bsc_cs";
ntasksPerNode = hw.socketsPerNode; # MPI binded to sockets
cpusPerTask = hw.cpusPerSocket; # Using the 24 CPUs of each socket
};
#*** Compute the final set of configurations ***
# Compute the array of configurations: cartesian product of all factors
allConfigs = stdexp.buildConfigs {
inherit varConf genConf;
};
# Filter to remove non-desired configurations:
# --> tasks/proc < 3
# --> nblz > 25
configs = filter (el: if ((builtins.mul el.nbly el.nblz) < (builtins.mul 3 el.cpusPerTask) || el.nblz > 25) then false else true) allConfigs;
#*** Sets the env/argv of the program ***
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export OMP_NUM_THREADS=${toString hw.cpusPerSocket}
'';
};
#*** Configure the program according to the app ***
program = {nextStage, conf, ...}:
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit (conf) enableManualDist nbgx nbgy nbgz nblx nbly nblz mpi gitBranch gitCommit;
};
#*** Add stages to the pipeline ***
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -1,104 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
#nbl = [ 1 2 4 8 16 32 64 ];
nodes = [ 1 2 4 8 ];
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 ; }
];
};
# 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";
inherit (targetMachine.config) hw;
# saiph options
manualDist = 1;
nbgx = 1;
nbgy = 1;
nbgz = nodes*2;
nblx = 1;
#nbly = c.nbl;
#nblz = c.nbl;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
#gitCommit = c.gitCommit; # if exp involves more than 1 commit
gitCommit = "3fa116620f1c7fbd1127d785c8bdc5d2372837b3";
#inherit (c) gitCommit; # if exp fixes the commit
inherit (c.input) nbly nblz nbltotal ;
# Repeat the execution of each unit 50 times
loops = 10;
# Resources
qos = "bsc_cs";
ntasksPerNode = hw.socketsPerNode;
nodes = c.nodes;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}";
};
# Compute the array of configurations
configsAll = stdexp.buildConfigs {
inherit varConf genConf;
};
configs = filter (el: if (el.nbly == 24 && el.nblz == 4) && el.nodes == 4 then false else true) configsAll;
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 {
inherit (conf) manualDist nbgx nbgy nbgz nblx nbly nblz nbltotal mpi gitBranch gitCommit;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }
# last plot hash: f5xb7jv1c4mbrcy6d9s9j10msfz3kkj0-plot

View File

@ -1,104 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
#nbl = [ 1 2 4 8 16 32 64 ];
nodes = [ 1 2 4 8 ];
input = [
{ nblz=12 ; nbly=1; nbltotal=12 ; }
{ nblz=24 ; nbly=1; nbltotal=24 ; }
{ nblz=48 ; nbly=1; nbltotal=48 ; }
{ nblz=96 ; nbly=1; nbltotal=96 ; }
{ nblz=6 ; nbly=2; nbltotal=12 ; }
{ nblz=12 ; nbly=2; nbltotal=24 ; }
{ nblz=24 ; nbly=2; nbltotal=48 ; }
{ nblz=48 ; nbly=2; nbltotal=96 ; }
{ nblz=96 ; nbly=2; nbltotal=192 ; }
{ nblz=3 ; nbly=4; nbltotal=12 ; }
{ nblz=6 ; nbly=4; nbltotal=24 ; }
{ nblz=12 ; nbly=4; nbltotal=48 ; }
{ nblz=24 ; nbly=4; nbltotal=96 ; }
{ nblz=48 ; nbly=4; nbltotal=192 ; }
{ nblz=96 ; nbly=4; nbltotal=384 ; }
];
};
# 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";
inherit (targetMachine.config) hw;
# saiph options
manualDist = 1;
nbgx = 1;
nbgy = 1;
nbgz = nodes*2;
nblx = 1;
#nbly = c.nbl;
#nblz = c.nbl;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
#gitCommit = c.gitCommit; # if exp involves more than 1 commit
gitCommit = "3fa116620f1c7fbd1127d785c8bdc5d2372837b3";
#inherit (c) gitCommit; # if exp fixes the commit
inherit (c.input) nbly nblz nbltotal ;
# Repeat the execution of each unit 50 times
loops = 10;
# Resources
qos = "bsc_cs";
ntasksPerNode = hw.socketsPerNode;
nodes = c.nodes;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
#configs = filter (el: if (el.nbly == 24 && el.nblz == 4) && el.nodes == 4 then false else true) configsAll;
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 {
inherit (conf) manualDist nbgx nbgy nbgz nblx nbly nblz nbltotal mpi gitBranch gitCommit;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }
# last plot hash: f5xb7jv1c4mbrcy6d9s9j10msfz3kkj0-plot

View File

@ -1,70 +0,0 @@
{
stdenv
, stdexp
, bsc
, targetMachine
, stages
}:
with stdenv.lib;
let
# Initial variable configuration
varConf = with bsc; {
nodes = [ 1 2 4 8 16 32 ];
};
# Generate the complete configuration for each unit
genConf = with bsc; c: targetMachine.config // rec {
expName = "saiph.strongScaling";
unitName = "${expName}.nodes-${toString nodes}-nb{y, z}=4.nsteps-${toString nsteps}";
inherit (targetMachine.config) hw;
# saiph options
nbx = 1;
nby = 4;
nbz = 4;
nsteps = 500;
mpi = impi;
gitBranch = "garlic/tampi+isend+oss+task+simd";
# Repeat the execution of each unit 50 times
loops = 30;
# Resources
cachelineBytes = hw.cachelineBytes;
time = "02:00:00";
nodes = c.nodes;
qos = if (nodes>16)
then "bsc_cs"
else "debug";
ntasksPerNode = hw.socketsPerNode;
cpusPerTask = hw.cpusPerSocket;
jobName = "${unitName}-${gitBranch}";
};
# Compute the array of configurations
configs = stdexp.buildConfigs {
inherit varConf genConf;
};
exec = {nextStage, conf, ...}: with conf; stages.exec {
inherit nextStage;
env = ''
export ASAN_SYMBOLIZER_PATH=${bsc.clangOmpss2Unwrapped}/bin/llvm-symbolizer
'';
};
program = {nextStage, conf, ...}: with conf;
let
customPkgs = stdexp.replaceMpi conf.mpi;
in
customPkgs.apps.saiph.override {
inherit nbx nby nbz nsteps mpi gitBranch cachelineBytes;
};
pipeline = stdexp.stdPipeline ++ [ exec program ];
in
stdexp.genExperiment { inherit configs pipeline; }

View File

@ -42,14 +42,8 @@ in
};
saiph = with exp.saiph; {
granularity = stdPlot ./saiph/granularity.R [ granularity ];
scaling = stdPlot ./saiph/scaling.R [ scaling ];
scaling2 = stdPlot ./saiph/scaling2.R [ scaling2 ];
scalingnblyz = stdPlot ./saiph/scalingnblyz.R [ scaling scaling2 ];
blockingY = stdPlot ./saiph/granularityY.R [ blockingY ];
blockingZ = stdPlot ./saiph/granularityZ.R [ blockingZ ];
blockingYZ = stdPlot ./saiph/granularityYZ.R [ blockingYZ ];
blockingZY = stdPlot ./saiph/granularityZY.R [ blockingZY ];
granularity-saiph = stdPlot ./saiph/granularity-saiph.R [ granularity-saiph ];
scalability-saiph = stdPlot ./saiph/scalability-saiph.R [ scalability-saiph ];
};
heat = with exp.heat; {

View File

@ -1,100 +0,0 @@
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.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nby, y=tnorm, color=bad)) +
# Labels
labs(x="nb{y-z}", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nby, y=time)) +
labs(x="nb{y-z}", y="Time (s)",
title=sprintf("Saiph-Heat3D blocking-granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,77 +0,0 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input1.json"
if (length(args)>0) { input_file = args[1] }
input_file2 = "input2.json"
if (length(args)>0) { input_file2 = args[1] }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
jsonlite::flatten()
dataset2 = jsonlite::stream_in(file(input_file2)) %>%
jsonlite::flatten()
# We only need the nblocks and time
df = select(dataset, config.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
df2 = select(dataset2, config.nbz, time) %>%
rename(nbz=config.nbz)
df2$nbz = as.factor(df2$nbz)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
D2=group_by(df2, nbz) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D2$bad = as.factor(D2$bad)
print(D)
print(D2)
png("scatter-blockY8Z_yZ8.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot() +
geom_point(data=D, aes(x=nby, y=time, colour="nby blocks - nbz = 8"), shape=1, size=3) +
geom_point(data=D2, aes(x=nbz, y=time, colour="nby = 8 - nbz blocks"), shape=1, size=3) +
labs(x="nb", y="Time (s)",
title=sprintf("Saiph-Heat3D blockingY/Z"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "right") +
geom_point(shape=21, size=3) +
scale_colour_discrete("Blocked directions")
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,100 +0,0 @@
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.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nby, y=tnorm, color=bad)) +
# Labels
labs(x="nby", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nby, y=time)) +
labs(x="nby", y="Time (s)",
title=sprintf("Saiph-Heat3D blockingY"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3)
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,100 +0,0 @@
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.nbz, time) %>%
rename(nbz=config.nbz)
df$nbz = as.factor(df$nbz)
# Normalize the time by the median
D=group_by(df, nbz) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nbz, y=tnorm, color=bad)) +
# Labels
labs(x="nbz", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time - nby = 8"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbz, y=time)) +
labs(x="nbz", y="Time (s)",
title=sprintf("Saiph-Heat3D blockingZ - nby = 8"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3)
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,100 +0,0 @@
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.nbz, time) %>%
rename(nbz=config.nbz)
df$nbz = as.factor(df$nbz)
# Normalize the time by the median
D=group_by(df, nbz) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nbz, y=tnorm, color=bad)) +
# Labels
labs(x="nbz", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbz, y=time)) +
labs(x="nbz", y="Time (s)",
title=sprintf("Saiph-Heat3D blockingZ"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3)
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,100 +0,0 @@
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.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nby, y=tnorm, color=bad)) +
# Labels
labs(x="nby", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time - nbz = 8"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nby, y=time)) +
labs(x="nby", y="Time (s)",
title=sprintf("Saiph-Heat3D blockingY - nbz = 8"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3)
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,67 +0,0 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file1 = "input1.json"
if (length(args)>0) { input_file1 = args[1] }
input_file2 = "input2.json"
if (length(args)>1) { input_file2 = args[2] }
# Load the dataset in NDJSON format
dataset1 = jsonlite::stream_in(file(input_file1)) %>%
jsonlite::flatten()
dataset2 = jsonlite::stream_in(file(input_file2)) %>%
jsonlite::flatten()
# We only need the nblocks and time
df1 = select(dataset1, config.nbx, time) %>%
rename(nb1=config.nbx)
df2 = select(dataset2, config.nby, time) %>%
rename(nb2=config.nby)
df1$nb1 = as.factor(df1$nb1)
df2$nb2 = as.factor(df2$nb2)
# Normalize the time by the median
D1=group_by(df1, nb1)
D2=group_by(df2, nb2)
print(D1)
print(D2)
ppi=300
h=5
w=7
png("scatter_granularity_and_blocking.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot() +
geom_point(data=D1, aes(x=nb1, y=time, colour = 'nbx-nby-nbz'), shape=1, size=4) +
geom_point(data=D2, aes(x=nb2, y=time, colour = 'nby-nbz'), shape=1, size=4) +
labs(x="nb", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity & blocking"),
subtitle=input_file1) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
#theme(legend.position = c(0.5, 0.88)) +
theme(legend.position = "right") +
geom_point(shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
scale_colour_discrete("Blocked directions")
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -0,0 +1,155 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
library(viridis)
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()
# Create a data frame selecting the desired variables from the data set
df = select(dataset, config.nbly, config.nblz, config.nodes, time, total_time) %>%
rename(nbly=config.nbly, nblz=config.nblz, nnodes=config.nodes)
# Declare variables as factors
# --> R does not allow to operate with factors: operate before casting to factors
df$nblPerProc = as.factor(round((df$nbly * df$nblz) / 24, digits = 2))
df$biggernbly = as.factor(df$nbly > df$nblz)
df$nbly = as.factor(df$nbly)
df$nblz = as.factor(df$nblz)
df$nodes = as.factor(df$nnodes)
# Create a new data frame including statistics
D=group_by(df, nbly, nblz, nblPerProc, nodes) %>%
mutate(tmedian = median(time)) %>%
mutate(ttmedian = median(total_time)) %>%
mutate(tnorm = time / tmedian - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0))) %>%
mutate(tn = tmedian * nnodes) %>%
ungroup()
D$bad = as.factor(D$bad)
### Std output data frame D
print(D)
### Output figure size
ppi=300
h=5
w=8
####################################################################
### Boxplot
####################################################################
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nblPerProc, y=tnorm, color=bad)) +
# Labels
labs(x="nblPerProc", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
# Render the plot
print(p)
## Save the png image
dev.off()
####################################################################
### XY Scatter plot - measured_time & total_time vs tasks per cpu
####################################################################
####################################################################
### XY Scatter plot - time vs tasks per cpu
####################################################################
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
## Create the plot with the normalized time vs nblocks per proc
p = ggplot(D, aes(x=nblPerProc, y=time)) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3) +
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
## Save the png image
dev.off()
####################################################################
### XY Scatter plot - median time vs tasks per cpu
####################################################################
png("scatter2.png", width=w*ppi, height=h*ppi, res=ppi)
## Create the plot with the normalized time vs nblocks per proc
p = ggplot(D, aes(x=nblPerProc, y=tmedian)) +
labs(x="nblPerProc", y="Median Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(aes(color=biggernbly), shape=21, size=3) +
labs(color = "nbly > nblz")
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()
####################################################################
### Heatmap plot - median time vs tasks per cpu per dimension
####################################################################
heatmap_plot = function(df, colname, title) {
p = ggplot(df, aes(x=nbly, y=nblz, fill=!!ensym(colname))) +
geom_raster() +
#scale_fill_gradient(high="black", low="white") +
scale_fill_viridis(option="plasma") +
coord_fixed() +
theme_bw() +
theme(axis.text.x=element_text(angle = -45, hjust = 0)) +
theme(plot.subtitle=element_text(size=8)) +
guides(fill = guide_colorbar(barwidth=12, title.vjust=0.8)) +
labs(x="nbly", y="nblz",
title=sprintf("Heat granularity: %s", title),
subtitle=input_file) +
theme(legend.position="bottom")+
facet_wrap( ~ nodes)
k=1
ggsave(sprintf("%s.png", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
ggsave(sprintf("%s.pdf", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
}
# call heatmap function with colname and legend title
heatmap_plot(D, "tmedian", "time")

View File

@ -1,100 +0,0 @@
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.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nby, y=tnorm, color=bad)) +
# Labels
labs(x="nb{y-z}", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nby, y=time)) +
labs(x="nb{y-z}", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3)
#+ scale_x_continuous(trans=log2_trans())
#+ scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,100 +0,0 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "nov24Gran.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.nby, time) %>%
rename(nby=config.nby)
df$nby = as.factor(df$nby)
# Normalize the time by the median
D=group_by(df, nby) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nby, y=tnorm, color=bad)) +
# Labels
labs(x="nb{y-z}", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nby, y=time)) +
labs(x="nb{y-z}", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -0,0 +1,156 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
library(viridis)
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()
# Create a data frame selecting the desired variables from the data set
df = select(dataset, config.nbly, config.nblz, config.nodes, time, total_time) %>%
rename(nbly=config.nbly, nblz=config.nblz, nnodes=config.nodes)
# Declare variables as factors
# --> R does not allow to operate with factors: operate before casting to factors
df$nblPerProc = as.factor(round((df$nbly * df$nblz) / 24, digits = 2))
df$biggernbly = as.factor(df$nbly > df$nblz)
df$nbly = as.factor(df$nbly)
df$nblz = as.factor(df$nblz)
df$nodes = as.factor(df$nnodes)
# Create a new data frame including statistics
D=group_by(df, nbly, nblz, nblPerProc, nodes) %>%
mutate(tmedian = median(time)) %>%
mutate(ttmedian = median(total_time)) %>%
mutate(tnorm = time / tmedian - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0))) %>%
mutate(tn = tmedian * nnodes) %>%
ungroup()
D$bad = as.factor(D$bad)
### Std output data frame D
print(D)
### Output figure size
ppi=300
h=5
w=8
####################################################################
### Boxplot
####################################################################
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nblPerProc, y=tnorm, color=bad)) +
# Labels
labs(x="nblPerProc", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
# Render the plot
print(p)
## Save the png image
dev.off()
####################################################################
### XY Scatter plot - measured_time & total_time vs tasks per cpu
####################################################################
####################################################################
### XY Scatter plot - time vs tasks per cpu
####################################################################
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
## Create the plot with the normalized time vs nblocks per proc
p = ggplot(D, aes(x=nblPerProc, y=time)) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(aes(color=nodes), shape=21, size=3) +
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
## Save the png image
dev.off()
####################################################################
### XY Scatter plot - median time vs tasks per cpu
####################################################################
png("scatter2.png", width=w*ppi, height=h*ppi, res=ppi)
## Create the plot with the normalized time vs nblocks per proc
p = ggplot(D, aes(x=nblPerProc, y=tn)) +
labs(x="nblPerProc", y="Median Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(aes(color=nodes), shape=21, size=3) +
labs(color = "nbly > nblz")
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()
####################################################################
### Heatmap plot - median time vs tasks per cpu per dimension
####################################################################
heatmap_plot = function(df, colname, title) {
p = ggplot(df, aes(x=nbly, y=nblz, fill=!!ensym(colname))) +
geom_raster() +
#scale_fill_gradient(high="black", low="white") +
scale_fill_viridis(option="plasma") +
coord_fixed() +
theme_bw() +
theme(axis.text.x=element_text(angle = -45, hjust = 0)) +
theme(plot.subtitle=element_text(size=8)) +
guides(fill = guide_colorbar(barwidth=12, title.vjust=0.8)) +
labs(x="nbly", y="nblz",
title=sprintf("Heat granularity: %s", title),
subtitle=input_file) +
theme(legend.position="bottom")+
facet_wrap( ~ nodes)
k=1
ggsave(sprintf("%s.png", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
ggsave(sprintf("%s.pdf", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
}
# call heatmap function with colname and legend title
heatmap_plot(D, "tmedian", "time")

View File

@ -1,210 +0,0 @@
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.nbly, config.nodes, time, total_time, config.gitCommit) %>%
# rename(nbly=config.nbly, nnodes=config.nodes, gitCommit=config.gitCommit)
df = select(dataset, config.nbly, config.nblz, config.nbltotal, config.nodes, time, total_time) %>%
rename(nbly=config.nbly, nblz=config.nblz, nbltotal=config.nbltotal, nnodes=config.nodes)
df$nbly = as.factor(df$nbly)
df$nblz = as.factor(df$nblz)
df$nblPerProc = as.factor(df$nbltotal / 24)
df$nbltotal = as.factor(df$nbltotal)
df$nodes = as.factor(df$nnodes)
#df$gitCommit = as.factor(df$gitCommit)
# Normalize the time by the median
#D=group_by(df, nbly, nodes, gitCommit) %>%
D=group_by(df, nbly, nblz, nbltotal, nodes) %>%
mutate(tmedian = median(time)) %>%
mutate(ttmedian = median(total_time)) %>%
mutate(tnorm = time / tmedian - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0))) %>%
mutate(tn = tmedian * nnodes) %>%
ungroup()
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=8
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nbly, y=tnorm, color=bad)) +
# Labels
labs(x="nbly", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbltotal, y=time)) +
labs(x="nbltotal", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(aes(color=nodes), shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("scatter1.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nblPerProc, y=time)) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity per nodes"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.5)) +
geom_point(aes(color=nblz), shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nodes)
# Render the plot
print(p)
# Save the png image
dev.off()
png("wasted.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbly, y=time)) +
labs(x="nbly", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_point(aes(y=total_time), shape=1, size=3, color="red") +
geom_line(aes(y=tmedian, color=nodes, group=nodes)) +
geom_line(aes(y=ttmedian, color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("test.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbltotal, y=tn)) +
labs(x="nbltotal", y="Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_line(aes(color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("test1.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nblPerProc, y=tn)) +
labs(x="nblPerProc", y="Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity per nblz blocks"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_line(aes(color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nblz)
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,210 +0,0 @@
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.nbly, config.nodes, time, total_time, config.gitCommit) %>%
# rename(nbly=config.nbly, nnodes=config.nodes, gitCommit=config.gitCommit)
df = select(dataset, config.nbly, config.nblz, config.nbltotal, config.nodes, time, total_time) %>%
rename(nbly=config.nbly, nblz=config.nblz, nbltotal=config.nbltotal, nnodes=config.nodes)
df$nbly = as.factor(df$nbly)
df$nblz = as.factor(df$nblz)
df$nblPerProc = as.factor(df$nbltotal / 24)
df$nbltotal = as.factor(df$nbltotal)
df$nodes = as.factor(df$nnodes)
#df$gitCommit = as.factor(df$gitCommit)
# Normalize the time by the median
#D=group_by(df, nbly, nodes, gitCommit) %>%
D=group_by(df, nbly, nblz, nbltotal, nodes) %>%
mutate(tmedian = median(time)) %>%
mutate(ttmedian = median(total_time)) %>%
mutate(tnorm = time / tmedian - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0))) %>%
mutate(tn = tmedian * nnodes) %>%
ungroup()
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=8
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nbly, y=tnorm, color=bad)) +
# Labels
labs(x="nbly", y="Normalized time",
title=sprintf("Saiph-Heat3D normalized time"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbltotal, y=time)) +
labs(x="nbltotal", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(aes(color=nodes), shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("scatter1.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nblPerProc, y=time)) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity per nodes"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.5)) +
geom_point(aes(color=nbly), shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nodes)
# Render the plot
print(p)
# Save the png image
dev.off()
png("wasted.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbly, y=time)) +
labs(x="nbly", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_point(aes(y=total_time), shape=1, size=3, color="red") +
geom_line(aes(y=tmedian, color=nodes, group=nodes)) +
geom_line(aes(y=ttmedian, color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("test.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nbltotal, y=tn)) +
labs(x="nbltotal", y="Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_line(aes(color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# facet_wrap( ~ gitCommit)
# Render the plot
print(p)
# Save the png image
dev.off()
png("test1.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nblPerProc, y=tn)) +
labs(x="nblPerProc", y="Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity per nbly blocks"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_line(aes(color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nbly)
# Render the plot
print(p)
# Save the png image
dev.off()

View File

@ -1,162 +0,0 @@
library(ggplot2)
library(dplyr)
library(scales)
library(jsonlite)
library(viridis)
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.nbly, config.nodes, time, total_time, config.gitCommit) %>%
# rename(nbly=config.nbly, nnodes=config.nodes, gitCommit=config.gitCommit)
df = select(dataset, config.nbly, config.nblz, config.nbltotal, config.nodes, time, total_time) %>%
rename(nbly=config.nbly, nblz=config.nblz, nbltotal=config.nbltotal, nnodes=config.nodes)
df2 = df[df$nblz == 1 | df$nblz == 2 | df$nblz == 4, ]
df3 = df[df$nbly == 1 | df$nbly == 2 | df$nbly == 4, ]
# df2 data frame
df2$nblsetZ = as.factor(df2$nblz)
df2$nblPerProcZ = as.factor(df2$nbltotal / 24)
df2$nbltotal = as.factor(df2$nbltotal)
df2$nodes = as.factor(df2$nnodes)
# df3 data frame
df3$nblsetY = as.factor(df3$nbly)
df3$nblPerProcY = as.factor(df3$nbltotal / 24)
df3$nbltotalY = as.factor(df3$nbltotal)
df3$nodes = as.factor(df3$nnodes)
df$nbly = as.factor(df$nbly)
df$nblz = as.factor(df$nblz)
df$nblPerProc = as.factor(df$nbltotal / 24)
df$nbltotal = as.factor(df$nbltotal)
df$nodes = as.factor(df$nnodes)
#df$gitCommit = as.factor(df$gitCommit)
# Normalize the time by the median
#D=group_by(df, nbly, nodes, gitCommit) %>%
D=group_by(df, nbly, nblz, nbltotal, nodes) %>%
mutate(tmedian = median(time)) %>%
mutate(ttmedian = median(total_time)) %>%
mutate(tnorm = time / tmedian - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0))) %>%
mutate(tn = tmedian * nnodes) %>%
ungroup()
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=8
png("scatter_nbly.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot() +
geom_point(data=df2, aes(x=nblPerProcZ, y=time, color=nblsetZ), shape=21, size=3, show.legend=TRUE) +
geom_point(data=df3, aes(x=nblPerProcY, y=time, color=nblsetY), shape=4, size=2, show.legend=TRUE) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity per nodes"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.5)) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nodes)
# Render the plot
print(p)
# Save the png image
dev.off()
png("scatter_nbly.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot() +
geom_point(data=df2, aes(x=nblPerProcZ, y=time, color=nblsetZ), shape=21, size=3, show.legend=TRUE) +
geom_point(data=df3, aes(x=nblPerProcY, y=time, color=nblsetY), shape=4, size=2, show.legend=TRUE) +
labs(x="nblPerProc", y="Time (s)",
title=sprintf("Saiph-Heat3D granularity per nodes"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.5)) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nodes)
# Render the plot
print(p)
# Save the png image
dev.off()
png("test1.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nblPerProc, y=tn)) +
labs(x="nblPerProc", y="Time (s) * nodes",
title=sprintf("Saiph-Heat3D granularity per nbly blocks"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
geom_point(shape=21, size=3) +
geom_line(aes(color=nodes, group=nodes)) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans()) +
facet_wrap( ~ nbly)
# Render the plot
print(p)
# Save the png image
dev.off()
heatmap_plot = function(df, colname, title) {
p = ggplot(df, aes(x=nbly, y=nblz, fill=!!ensym(colname))) +
geom_raster() +
#scale_fill_gradient(high="black", low="white") +
scale_fill_viridis(option="plasma") +
coord_fixed() +
theme_bw() +
theme(axis.text.x=element_text(angle = -45, hjust = 0)) +
theme(plot.subtitle=element_text(size=8)) +
#guides(fill = guide_colorbar(barwidth=15, title.position="top")) +
guides(fill = guide_colorbar(barwidth=12, title.vjust=0.8)) +
labs(x="nbly", y="nblz",
title=sprintf("Heat granularity: %s", title),
subtitle=input_file) +
theme(legend.position="bottom")+
facet_wrap( ~ nodes)
k=1
ggsave(sprintf("%s.png", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
ggsave(sprintf("%s.pdf", colname), plot=p, width=4.8*k, height=5*k, dpi=300)
}
heatmap_plot(D, "tmedian", "time")

View File

@ -1,100 +0,0 @@
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.nodes, time) %>%
rename(nodes=config.nodes)
df$nodes = as.factor(df$nodes)
# Normalize the time by the median
D=group_by(df, nodes) %>%
mutate(tnorm = time / median(time) - 1) %>%
mutate(bad = max(ifelse(abs(tnorm) >= 0.01, 1, 0)))
D$bad = as.factor(D$bad)
print(D)
ppi=300
h=5
w=5
png("box.png", width=w*ppi, height=h*ppi, res=ppi)
#
#
#
# Create the plot with the normalized time vs nblocks
p = ggplot(data=D, aes(x=nodes, y=tnorm, color=bad)) +
# Labels
labs(x="#nodes", y="Normalized time",
title=sprintf("Saiph-Heat3D Strong-Scaling\nLocal blocking nb{y-z} = 4"),
subtitle=input_file) +
# Center the title
#theme(plot.title = element_text(hjust = 0.5)) +
# Black and white mode (useful for printing)
#theme_bw() +
# Add the maximum allowed error lines
geom_hline(yintercept=c(-0.01, 0.01),
linetype="dashed", color="gray") +
# Draw boxplots
geom_boxplot() +
scale_color_manual(values=c("black", "brown")) +
#scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = "none")
#theme(legend.position = c(0.85, 0.85))
# Render the plot
print(p)
## Save the png image
dev.off()
#
png("scatter.png", width=w*ppi, height=h*ppi, res=ppi)
#
## Create the plot with the normalized time vs nblocks
p = ggplot(D, aes(x=nodes, y=time)) +
labs(x="#nodes", y="Time (s)",
title=sprintf("Saiph-Heat3D Strong-Scaling\nLocal blocking nb{y-z} = 4"),
subtitle=input_file) +
theme_bw() +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88)) +
geom_point(shape=21, size=3) +
#scale_x_continuous(trans=log2_trans()) +
scale_y_continuous(trans=log2_trans())
# Render the plot
print(p)
# Save the png image
dev.off()