From 87f751185c07c20bc40649c5bc88181046c5f7cf Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 30 Mar 2021 15:55:57 +0200 Subject: [PATCH] creams: merge similar experiments together Large experiments have the enableExtended parameter disabled by default, which enables more tests. --- garlic/exp/creams/gran+node1.nix | 114 --------------------------- garlic/exp/creams/gran+node16.nix | 114 --------------------------- garlic/exp/creams/gran+node2.nix | 114 --------------------------- garlic/exp/creams/gran+node4.nix | 114 --------------------------- garlic/exp/creams/gran+node8.nix | 114 --------------------------- garlic/exp/creams/granularity.nix | 125 ++++++++++++++++++++++++++++++ garlic/exp/creams/ss+hybrid.nix | 112 -------------------------- garlic/exp/creams/ss+pure.nix | 107 ------------------------- garlic/exp/creams/ss.nix | 125 ++++++++++++++++++++++++++++++ garlic/exp/index.nix | 20 ++--- 10 files changed, 258 insertions(+), 801 deletions(-) delete mode 100644 garlic/exp/creams/gran+node1.nix delete mode 100644 garlic/exp/creams/gran+node16.nix delete mode 100644 garlic/exp/creams/gran+node2.nix delete mode 100644 garlic/exp/creams/gran+node4.nix delete mode 100644 garlic/exp/creams/gran+node8.nix create mode 100644 garlic/exp/creams/granularity.nix delete mode 100644 garlic/exp/creams/ss+hybrid.nix delete mode 100644 garlic/exp/creams/ss+pure.nix create mode 100644 garlic/exp/creams/ss.nix diff --git a/garlic/exp/creams/gran+node1.nix b/garlic/exp/creams/gran+node1.nix deleted file mode 100644 index beb23cf..0000000 --- a/garlic/exp/creams/gran+node1.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=1 ; nprocz=2 ; granul=256; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul=128; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul=64; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul=32; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul= 9; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul= 5; time= "02:00:00"; } - { nodes=1 ; nprocz=2 ; granul= 4; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-gran-node1"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node16.nix b/garlic/exp/creams/gran+node16.nix deleted file mode 100644 index 54a1ff2..0000000 --- a/garlic/exp/creams/gran+node16.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=16 ; nprocz=32 ; granul=64; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul=32; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul=16; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul= 9; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul= 5; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul= 4; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul= 2; time= "02:00:00"; } - { nodes=16 ; nprocz=32 ; granul= 1; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-gran-node16"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node2.nix b/garlic/exp/creams/gran+node2.nix deleted file mode 100644 index 4e05306..0000000 --- a/garlic/exp/creams/gran+node2.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=2 ; nprocz=4 ; granul=256; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=128; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=64; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=32; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul= 9; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul= 5; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul= 4; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-gran-node2"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node4.nix b/garlic/exp/creams/gran+node4.nix deleted file mode 100644 index 5fc46ca..0000000 --- a/garlic/exp/creams/gran+node4.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=4 ; nprocz=8 ; granul=64; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul=32; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul=16; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul= 9; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul= 5; time= "02:00:00"; } - { nodes=4 ; nprocz=4 ; granul= 4; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul= 2; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul= 1; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-gran-node4"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/gran+node8.nix b/garlic/exp/creams/gran+node8.nix deleted file mode 100644 index c6ad00c..0000000 --- a/garlic/exp/creams/gran+node8.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=8 ; nprocz=16 ; granul=64; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul=32; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul=16; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul= 9; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul= 5; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul= 4; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul= 2; time= "02:00:00"; } - { nodes=8 ; nprocz=16 ; granul= 1; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-gran-node8"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/granularity.nix b/garlic/exp/creams/granularity.nix new file mode 100644 index 0000000..e97a558 --- /dev/null +++ b/garlic/exp/creams/granularity.nix @@ -0,0 +1,125 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +, garlicTools +, enableExtended ? false +}: + +with stdenv.lib; +with garlicTools; + +let + # Initial variable configuration + varConf = { + granul = range2 4 128; + + gitBranch = [ + "garlic/tampi+isend+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+send+seq" + ] ++ optionals (enableExtended) [ + #"garlic/mpi+send+omp+fork" # Don't use fork for granularity + "garlic/mpi+send+omp+task" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+oss+task" + ]; + + # Max. number of iterations + iterations = [ 10 20 ]; + + nodes = [ 1 ] ++ optionals (enableExtended) (range2 2 16); + }; + + # We use these auxiliary functions to assign different configurations + # depending on the git branch. + getGranul = branch: oldGranul: + if (branch == "garlic/mpi+send+seq") + then 999999 else oldGranul; + + getCpusPerTask = branch: hw: + if (branch == "garlic/mpi+send+seq") + then 1 else hw.cpusPerSocket; + + getNtasksPerNode = branch: hw: + if (branch == "garlic/mpi+send+seq") + then hw.cpusPerNode else hw.socketsPerNode; + + # Generate the complete configuration for each unit + genConf = c: targetMachine.config // rec { + + expName = "creams-gran"; + unitName = "${expName}"+ + "-nodes${toString nodes}"+ + "-granul${toString granul}"+ + "-${gitBranch}"; + + inherit (targetMachine.config) hw; + + # Options for creams + inherit (c) gitBranch nodes iterations; + granul = getGranul gitBranch c.granul; + nprocz = ntasksPerNode * nodes; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + time = "02:00:00"; + ntasksPerNode = getNtasksPerNode gitBranch hw; + cpusPerTask = getCpusPerTask gitBranch hw; + jobName = unitName; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stdexp.stdStages.srun { + inherit nextStage conf; + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + sed -i '/maximum number of iterations/s/50/${toString conf.iterations}/' input.dat + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: bsc.apps.creams.override { + inherit (conf) gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + # Replace the stdandard srun stage with our own + overrides = { srun = customSrun; }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/ss+hybrid.nix b/garlic/exp/creams/ss+hybrid.nix deleted file mode 100644 index 26e1293..0000000 --- a/garlic/exp/creams/ss+hybrid.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=1 ; nprocz=2 ; granul=16; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=16; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul=9 ; time= "02:00:00"; } - { nodes=8 ; nprocz=16; granul=9 ; time= "02:00:00"; } - { nodes=16; nprocz=32; granul=9 ; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+omp+fork" - "garlic/mpi+send+omp+task" - "garlic/mpi+send+oss+task" - "garlic/mpi+isend+omp+task" - "garlic/mpi+isend+oss+task" - "garlic/tampi+isend+oss+task" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-ss-hybrid"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.socketsPerNode; - cpusPerTask = hw.cpusPerSocket; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/ss+pure.nix b/garlic/exp/creams/ss+pure.nix deleted file mode 100644 index 5d36e5e..0000000 --- a/garlic/exp/creams/ss+pure.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - # Initial variable configuration - varConf = { - input = [ - { nodes=1 ; nprocz=2 ; granul=999999; time= "02:00:00"; } - { nodes=2 ; nprocz=4 ; granul=999999; time= "02:00:00"; } - { nodes=4 ; nprocz=8 ; granul=999999; time= "02:00:00"; } - { nodes=8 ; nprocz=16; granul=999999; time= "02:00:00"; } - { nodes=16; nprocz=32; granul=999999; time= "02:00:00"; } - ]; - - gitBranch = [ - "garlic/mpi+send+seq" - ]; - }; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "creams-ss-pure"; - inherit (targetMachine.config) hw; - # Options for creams - cc = icc; - mpi = impi; - inherit (c.input) granul time nodes; - inherit (c) gitBranch; - unitName = "${expName}-${toString nodes}-${gitBranch}"; - - # Repeat the execution of each unit 10 times - loops = 10; - - # Resources - qos = "debug"; - ntasksPerNode = hw.cpusPerNode; - cpusPerTask = 1; - jobName = unitName; - - nprocz = ntasksPerNode * nodes; - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - # Custom srun stage to copy the creams input dataset - customSrun = {nextStage, conf, ...}: - let - input = bsc.garlic.apps.creamsInput.override { - inherit (conf) gitBranch granul nprocz; - }; - in - stages.srun { - # These are part of the stdndard srun stage: - inherit (conf) nixPrefix; - inherit nextStage; - cpuBind = "cores,verbose"; - - # Now we add some commands to execute before calling srun. These will - # only run in one rank (the first in the list of allocated nodes) - preSrun = '' - cp -r ${input}/SodTubeBenchmark/* . - chmod +w -R . - rm -f nanos6.toml - ''; - }; - - exec = {nextStage, conf, ...}: with conf; stages.exec { - inherit nextStage; - env = '' - export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" - ''; - - # Remove restarts as is not needed and is huge - post = '' - rm -rf restarts || true - ''; - }; - - # Creams program - creams = {nextStage, conf, ...}: with conf; - let - customPkgs = stdexp.replaceMpi conf.mpi; - in - customPkgs.apps.creams.override { - inherit cc mpi gitBranch; - }; - - pipeline = stdexp.stdPipelineOverride { - overrides = { - # Replace the stdandard srun stage with our own - srun = customSrun; - }; - } ++ [ exec creams ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/creams/ss.nix b/garlic/exp/creams/ss.nix new file mode 100644 index 0000000..f152d6c --- /dev/null +++ b/garlic/exp/creams/ss.nix @@ -0,0 +1,125 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +, garlicTools +, enableExtended ? false +}: + +with stdenv.lib; +with garlicTools; + +let + # Initial variable configuration + varConf = { + + nodes = range2 1 16; + granul = [ 16 ] ++ optionals (enableExtended) [ 8 32 ]; + + # Max. number of iterations + iterations = [ 20 ] ++ optionals (enableExtended) [ 10 ]; + + gitBranch = [ + "garlic/tampi+isend+oss+task" + "garlic/mpi+send+omp+task" + "garlic/mpi+send+seq" + ] ++ optionals (enableExtended) [ + "garlic/mpi+send+omp+fork" + "garlic/mpi+send+oss+task" + "garlic/mpi+isend+omp+task" + "garlic/mpi+isend+oss+task" + ]; + }; + + # We use these auxiliary functions to assign different configurations + # depending on the git branch. + getGranul = branch: oldGranul: + if (branch == "garlic/mpi+send+seq") + then 999999 else oldGranul; + + getCpusPerTask = branch: hw: + if (branch == "garlic/mpi+send+seq") + then 1 else hw.cpusPerSocket; + + getNtasksPerNode = branch: hw: + if (branch == "garlic/mpi+send+seq") + then hw.cpusPerNode else hw.socketsPerNode; + + # Generate the complete configuration for each unit + genConf = c: targetMachine.config // rec { + + expName = "creams-ss"; + unitName = "${expName}"+ + "-nodes${toString nodes}"+ + "-granul${toString granul}"+ + "-${gitBranch}"; + + inherit (targetMachine.config) hw; + + # Options for creams + inherit (c) iterations gitBranch nodes; + granul = getGranul gitBranch c.granul; + nprocz = ntasksPerNode * nodes; + + # Repeat the execution of each unit 10 times + loops = 10; + + # Resources + qos = "debug"; + time = "02:00:00"; + ntasksPerNode = getNtasksPerNode gitBranch hw; + cpusPerTask = getCpusPerTask gitBranch hw; + jobName = unitName; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + # Custom srun stage to copy the creams input dataset + customSrun = {nextStage, conf, ...}: + let + input = bsc.garlic.apps.creamsInput.override { + inherit (conf) gitBranch granul nprocz; + }; + in + stdexp.stdStages.srun { + inherit nextStage conf; + # Now we add some commands to execute before calling srun. These will + # only run in one rank (the first in the list of allocated nodes) + preSrun = '' + cp -r ${input}/SodTubeBenchmark/* . + chmod +w -R . + sed -i '/maximum number of iterations/s/50/${toString conf.iterations}/' input.dat + rm -f nanos6.toml + ''; + }; + + exec = {nextStage, conf, ...}: stages.exec { + inherit nextStage; + env = '' + export NANOS6_CONFIG_OVERRIDE="version.dependencies=regions" + ''; + + # Remove restarts as is not needed and is huge + post = '' + rm -rf restarts || true + ''; + }; + + # Creams program + creams = {nextStage, conf, ...}: bsc.apps.creams.override { + inherit (conf) gitBranch; + }; + + pipeline = stdexp.stdPipelineOverride { + # Replace the stdandard srun stage with our own + overrides = { srun = customSrun; }; + } ++ [ exec creams ]; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/index.nix b/garlic/exp/index.nix index ec90363..68cedd9 100644 --- a/garlic/exp/index.nix +++ b/garlic/exp/index.nix @@ -36,18 +36,14 @@ granularity = callPackage ./saiph/granularity.nix { }; }; - creams = { - ss = { - pure = callPackage ./creams/ss+pure.nix { }; - hybrid = callPackage ./creams/ss+hybrid.nix { }; - }; - gran = { - node1 = callPackage ./creams/gran+node1.nix { }; - node2 = callPackage ./creams/gran+node2.nix { }; - node4 = callPackage ./creams/gran+node4.nix { }; - node8 = callPackage ./creams/gran+node8.nix { }; - node16 = callPackage ./creams/gran+node16.nix { }; - }; + creams = rec { + ss = callPackage ./creams/ss.nix { }; + granularity = callPackage ./creams/granularity.nix { }; + + # These experiments are the extended versions of the previous + # ones. We split them so we can keep a reasonable execution time + big.granularity = granularity.override { enableExtended = true; }; + big.ss = granularity.override { enableExtended = true; }; }; hpcg = rec {