diff --git a/garlic/exp/creams/gran+node1.nix b/garlic/exp/creams/gran+node1.nix new file mode 100644 index 0000000000000000000000000000000000000000..beb23cf79fdfb8383074f6b3c591047fd897c920 --- /dev/null +++ b/garlic/exp/creams/gran+node1.nix @@ -0,0 +1,114 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = { + input = [ + { nodes=1 ; nprocz=2 ; granul=256; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul=128; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul=64; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul=32; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul= 9; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul= 5; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul= 4; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + "garlic/tampi+isend+oss+task" + ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + expName = "creams-gran-node1"; + inherit (targetMachine.config) hw; + # Options for creams + cc = icc; + mpi = impi; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + ntasksPerNode = hw.socketsPerNode; + cpusPerTask = hw.cpusPerSocket; + jobName = unitName; + + nprocz = ntasksPerNode * nodes; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; + inherit nextStage; + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.creams.override { + inherit cc mpi gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node16.nix b/garlic/exp/creams/gran+node16.nix new file mode 100644 index 0000000000000000000000000000000000000000..54a1ff230ffedff24eafb812fd6d8e4a7bd780cf --- /dev/null +++ b/garlic/exp/creams/gran+node16.nix @@ -0,0 +1,114 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = { + input = [ + { nodes=16 ; nprocz=32 ; granul=64; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul=32; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul=16; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul= 9; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul= 5; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul= 4; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul= 2; time= "02:00:00"; } + { nodes=16 ; nprocz=32 ; granul= 1; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + "garlic/tampi+isend+oss+task" + ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + expName = "creams-gran-node16"; + inherit (targetMachine.config) hw; + # Options for creams + cc = icc; + mpi = impi; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + ntasksPerNode = hw.socketsPerNode; + cpusPerTask = hw.cpusPerSocket; + jobName = unitName; + + nprocz = ntasksPerNode * nodes; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; + inherit nextStage; + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.creams.override { + inherit cc mpi gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node2.nix b/garlic/exp/creams/gran+node2.nix new file mode 100644 index 0000000000000000000000000000000000000000..4e05306d791b48bbcf14cc754450f2ca64ff5ca5 --- /dev/null +++ b/garlic/exp/creams/gran+node2.nix @@ -0,0 +1,114 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = { + input = [ + { nodes=2 ; nprocz=4 ; granul=256; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=128; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=64; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=32; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul= 9; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul= 5; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul= 4; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + "garlic/tampi+isend+oss+task" + ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + expName = "creams-gran-node2"; + inherit (targetMachine.config) hw; + # Options for creams + cc = icc; + mpi = impi; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + ntasksPerNode = hw.socketsPerNode; + cpusPerTask = hw.cpusPerSocket; + jobName = unitName; + + nprocz = ntasksPerNode * nodes; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; + inherit nextStage; + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.creams.override { + inherit cc mpi gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node4.nix b/garlic/exp/creams/gran+node4.nix new file mode 100644 index 0000000000000000000000000000000000000000..5fc46cada44fa17cdbc8ce819d7c06747e7f62c6 --- /dev/null +++ b/garlic/exp/creams/gran+node4.nix @@ -0,0 +1,114 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = { + input = [ + { nodes=4 ; nprocz=8 ; granul=64; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul=32; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul=16; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul= 9; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul= 5; time= "02:00:00"; } + { nodes=4 ; nprocz=4 ; granul= 4; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul= 2; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul= 1; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + "garlic/tampi+isend+oss+task" + ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + expName = "creams-gran-node4"; + inherit (targetMachine.config) hw; + # Options for creams + cc = icc; + mpi = impi; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + ntasksPerNode = hw.socketsPerNode; + cpusPerTask = hw.cpusPerSocket; + jobName = unitName; + + nprocz = ntasksPerNode * nodes; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; + inherit nextStage; + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.creams.override { + inherit cc mpi gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node8.nix b/garlic/exp/creams/gran+node8.nix new file mode 100644 index 0000000000000000000000000000000000000000..c6ad00c61d9e769e65ced86ff5b7c11caa4a01af --- /dev/null +++ b/garlic/exp/creams/gran+node8.nix @@ -0,0 +1,114 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +}: + +with stdenv.lib; + +let + # Initial variable configuration + varConf = { + input = [ + { nodes=8 ; nprocz=16 ; granul=64; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul=32; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul=16; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul= 9; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul= 5; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul= 4; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul= 2; time= "02:00:00"; } + { nodes=8 ; nprocz=16 ; granul= 1; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + "garlic/tampi+isend+oss+task" + ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + expName = "creams-gran-node8"; + inherit (targetMachine.config) hw; + # Options for creams + cc = icc; + mpi = impi; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + ntasksPerNode = hw.socketsPerNode; + cpusPerTask = hw.cpusPerSocket; + jobName = unitName; + + nprocz = ntasksPerNode * nodes; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; + inherit nextStage; + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: with conf; + let + customPkgs = stdexp.replaceMpi conf.mpi; + in + customPkgs.apps.creams.override { + inherit cc mpi gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/ss+hybrid.nix b/garlic/exp/creams/ss+hybrid.nix index e10071e04a90d12a87f099bc191cfffacedc0986..26e1293ef0d4d92d1d948379ed3499af983d76d0 100644 --- a/garlic/exp/creams/ss+hybrid.nix +++ b/garlic/exp/creams/ss+hybrid.nix @@ -12,16 +12,18 @@ let # Initial variable configuration varConf = { input = [ - { nodes=1 ; nprocz=2 ; granul=37; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=19; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul=10; time= "02:00:00"; } + { nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul=9 ; time= "02:00:00"; } { nodes=8 ; nprocz=16; granul=9 ; time= "02:00:00"; } - { nodes=16; nprocz=32; granul=9 ; time= "02:00:00"; } + { nodes=16; nprocz=32; granul=9 ; time= "02:00:00"; } ]; gitBranch = [ "garlic/mpi+send+omp+fork" + "garlic/mpi+send+omp+task" "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" "garlic/mpi+isend+oss+task" "garlic/tampi+isend+oss+task" ]; @@ -29,25 +31,25 @@ let # Generate the complete configuration for each unit genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-ss"; - unitName = "${expName}-${toString nodes}-${gitBranch}"; + expName = "creams-ss-hybrid"; inherit (targetMachine.config) hw; # Options for creams cc = icc; mpi = impi; - inherit (c.input) granul; + inherit (c.input) granul time nodes; inherit (c) gitBranch; - nprocz = ntasksPerNode * nodes; + unitName = "${expName}-${toString nodes}-${gitBranch}"; - # Repeat the execution of each unit 30 times - loops = 30; + # Repeat the execution of each unit 10 times + loops = 10; # Resources qos = "debug"; ntasksPerNode = hw.socketsPerNode; cpusPerTask = hw.cpusPerSocket; - inherit (c.input) time nodes; jobName = unitName; + + nprocz = ntasksPerNode * nodes; }; # Compute the array of configurations @@ -55,29 +57,40 @@ let inherit varConf genConf; }; - # Use nanos6 with regions - nanos6Env = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - }; - - # Custom stage to copy the creams input dataset - copyInput = {nextStage, conf, ...}: + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: let input = bsc.garlic.apps.creamsInput.override { inherit (conf) gitBranch granul nprocz; }; in - stages.exec { + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; inherit nextStage; - env = '' + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' cp -r ${input}/SodTubeBenchmark/* . chmod +w -R . + rm -f nanos6.toml ''; }; + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + # Creams program creams = {nextStage, conf, ...}: with conf; let @@ -87,7 +100,12 @@ let inherit cc mpi gitBranch; }; - pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ]; + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; in diff --git a/garlic/exp/creams/ss+pure.nix b/garlic/exp/creams/ss+pure.nix index 75bcf5fb2521f1377bba785bc6be4212807b960d..5d36e5ee2d559af093b3a763f0d6f3c9fde7057b 100644 --- a/garlic/exp/creams/ss+pure.nix +++ b/garlic/exp/creams/ss+pure.nix @@ -12,35 +12,39 @@ let # Initial variable configuration varConf = { input = [ - { time="02:00:00"; nodes=1; } - { time="02:00:00"; nodes=2; } - { time="02:00:00"; nodes=4; } - { time="02:00:00"; nodes=8; } - { time="02:00:00"; nodes=16; } + { nodes=1 ; nprocz=2 ; granul=999999; time= "02:00:00"; } + { nodes=2 ; nprocz=4 ; granul=999999; time= "02:00:00"; } + { nodes=4 ; nprocz=8 ; granul=999999; time= "02:00:00"; } + { nodes=8 ; nprocz=16; granul=999999; time= "02:00:00"; } + { nodes=16; nprocz=32; granul=999999; time= "02:00:00"; } + ]; + + gitBranch = [ + "garlic/mpi+send+seq" ]; }; # Generate the complete configuration for each unit genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-ss"; - unitName = "${expName}-${toString nodes}-${gitBranch}"; + expName = "creams-ss-pure"; inherit (targetMachine.config) hw; # Options for creams cc = icc; mpi = impi; - granul = 0; - gitBranch = "garlic/mpi+send+seq"; - nprocz = ntasksPerNode * nodes; + inherit (c.input) granul time nodes; + inherit (c) gitBranch; + unitName = "${expName}-${toString nodes}-${gitBranch}"; - # Repeat the execution of each unit 30 times - loops = 30; + # Repeat the execution of each unit 10 times + loops = 10; # Resources qos = "debug"; ntasksPerNode = hw.cpusPerNode; cpusPerTask = 1; - inherit (c.input) time nodes; jobName = unitName; + + nprocz = ntasksPerNode * nodes; }; # Compute the array of configurations @@ -48,29 +52,40 @@ let inherit varConf genConf; }; - # Use nanos6 with regions - nanos6Env = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - }; - - # Custom stage to copy the creams input dataset - copyInput = {nextStage, conf, ...}: + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: let input = bsc.garlic.apps.creamsInput.override { inherit (conf) gitBranch granul nprocz; }; in - stages.exec { + stages.srun { + # These are part of the stdndard srun stage: + inherit (conf) nixPrefix; inherit nextStage; - env = '' + cpuBind = "cores,verbose"; + + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' cp -r ${input}/SodTubeBenchmark/* . chmod +w -R . + rm -f nanos6.toml ''; }; + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + # Creams program creams = {nextStage, conf, ...}: with conf; let @@ -80,7 +95,12 @@ let inherit cc mpi gitBranch; }; - pipeline = stdexp.stdPipeline ++ [ nanos6Env copyInput creams ]; + pipeline = stdexp.stdPipelineOverride { + overrides = { + # Replace the stdandard srun stage with our own + srun = customSrun; + }; + } ++ [ exec creams ]; in diff --git a/garlic/exp/index.nix b/garlic/exp/index.nix index a90daa025c9b9ab476658e2c7b29ca0824ff991a..ec9036347c0459f264ff60a954d763fef356042c 100644 --- a/garlic/exp/index.nix +++ b/garlic/exp/index.nix @@ -41,6 +41,13 @@ pure = callPackage ./creams/ss+pure.nix { }; hybrid = callPackage ./creams/ss+hybrid.nix { }; }; + gran = { + node1 = callPackage ./creams/gran+node1.nix { }; + node2 = callPackage ./creams/gran+node2.nix { }; + node4 = callPackage ./creams/gran+node4.nix { }; + node8 = callPackage ./creams/gran+node8.nix { }; + node16 = callPackage ./creams/gran+node16.nix { }; + }; }; hpcg = rec { diff --git a/garlic/fig/creams/gran.R b/garlic/fig/creams/gran.R new file mode 100644 index 0000000000000000000000000000000000000000..d0d3149849765bd0c945a93ccf26f1d62ce68eae --- /dev/null +++ b/garlic/fig/creams/gran.R @@ -0,0 +1,71 @@ +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), verbose=FALSE) %>% + jsonlite::flatten() + +# We only need some colums +df = select(dataset, unit, config.nodes, config.gitBranch, + config.granul, time, total_time) %>% + rename(nodes=config.nodes, gitBranch=config.gitBranch, + granul=config.granul) + +df$unit = as.factor(df$unit) +df$nnodes = df$nodes +df$nodes = as.factor(df$nodes) +df$gitBranch = as.factor(df$gitBranch) +df$granul = as.factor(df$granul) + +# Remove the "garlic/" prefix from the gitBranch +levels(df$gitBranch) <- substring((levels(df$gitBranch)), 8) + +# Compute new columns +D=group_by(df, unit) %>% + mutate(tnorm = time / median(time) - 1) %>% + mutate(bad = ifelse(max(abs(tnorm)) >= 0.01, 1, 0)) %>% + mutate(variability = ifelse(bad > 0, "large", "ok")) %>% + mutate(mtime = median(time)) %>% + mutate(nmtime = mtime*nnodes) %>% + mutate(ntime = time*nnodes) %>% + ungroup() %>% + mutate(min_nmtime = min(nmtime)) %>% + mutate(rnmtime = nmtime / min_nmtime) %>% + mutate(rntime = ntime / min_nmtime) %>% + mutate(rmeff = 1.0 / rnmtime) %>% + mutate(reff = 1.0 / rntime) %>% + group_by(gitBranch) %>% + mutate(tmax = max(mtime)) %>% + mutate(speedup=tmax/time) %>% + mutate(eff=speedup/nnodes) %>% + mutate(mspeedup=tmax/mtime) %>% + mutate(meff=mspeedup/nnodes) %>% + ungroup() + +D$bad = as.factor(D$bad > 0) +D$variability = as.factor(D$variability) + +ppi=300 +h=5 +w=5 + +png("time.png", width=w*1.5*ppi, height=h*ppi, res=ppi) +p = ggplot(D, aes(x=granul, y=mtime, linetype=gitBranch, shape=nodes)) + + geom_line(aes(group=interaction(nodes, gitBranch))) + + geom_point(aes(y=time)) + + scale_y_continuous(trans=log2_trans()) + + labs(x="Granularity", y="Time (s)", + title="Creams granularity", + subtitle=input_file) + + theme_bw() + + theme(plot.subtitle=element_text(size=8)) +print(p) +dev.off() diff --git a/garlic/fig/index.nix b/garlic/fig/index.nix index 1b370aedfdea4400eeecf8fc5f69dc8d13fd2b99..137c62907adabcfa03dfb4dc0a144fc4a4620ef1 100644 --- a/garlic/fig/index.nix +++ b/garlic/fig/index.nix @@ -53,6 +53,11 @@ in creams = with exp.creams; { ss = stdPlot ./creams/ss.R [ ss.hybrid ss.pure ]; + gran1 = stdPlot ./creams/gran.R [ gran.node1 ]; + gran2 = stdPlot ./creams/gran.R [ gran.node2 ]; + gran4 = stdPlot ./creams/gran.R [ gran.node4 ]; + gran8 = stdPlot ./creams/gran.R [ gran.node8 ]; + gran16 = stdPlot ./creams/gran.R [ gran.node16 ]; }; osu = with exp.osu; {