diff --git a/garlic/exp/fwi/ss-io.nix b/garlic/exp/fwi/ss-io.nix new file mode 100644 index 0000000..a561fc9 --- /dev/null +++ b/garlic/exp/fwi/ss-io.nix @@ -0,0 +1,76 @@ +# Strong scaling test for FWI variants based on tasks with and without I/O. +# This experiment solves a computationally expensive input which brings the +# storage devices to saturation when I/O is enabled. the same input us run +# without I/O for comparison purposes.. Also, the experiments are runt for a +# range of block sizes deemed as efficient according to the granularity +# experiment. + +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +, callPackage +}: + +with stdenv.lib; + +let + common = callPackage ./common.nix {}; + inherit (common) getConfigs getResources pipeline; + + inherit (targetMachine) fs; + + # Initial variable configuration + varConf = { + gitBranch = [ + "garlic/tampi+send+oss+task" + ]; + + blocksize = [ 1 2 4 8 ]; + n = [ {nx=500; nz=500; ny=16000;} ]; + nodes = [ 1 2 4 8 16 ]; + ioFreq = [ 9999 (-1) ]; + }; + + machineConfig = targetMachine.config; + + # Generate the complete configuration for each unit + genConf = c: targetMachine.config // rec { + expName = "fwi-ss-io"; + unitName = "${expName}" + + "-nodes${toString nodes}" + + "-bs${toString blocksize}" + + "-ioFreq${toString ioFreq}" + + "-${toString gitBranch}"; + + inherit (machineConfig) hw; + inherit (c) gitBranch blocksize ioFreq nodes; + inherit (c.n) nx ny nz; + + # Repeat the execution of each unit several times + loops = 10; + + # Resources + inherit (getResources { inherit gitBranch hw; }) + cpusPerTask ntasksPerNode; + + qos = "debug"; + time = "02:00:00"; + jobName = unitName; + + enableCTF = false; + + # Enable permissions to write in the local storage + extraMounts = [ fs.local.temp ]; + tempDir = fs.local.temp; + }; + + configs = getConfigs { + inherit varConf genConf; + }; + +in + + stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/fwi/strong_scaling_io.nix b/garlic/exp/fwi/strong_scaling_io.nix deleted file mode 100644 index c063659..0000000 --- a/garlic/exp/fwi/strong_scaling_io.nix +++ /dev/null @@ -1,141 +0,0 @@ -# Strong scaling test for FWI variants based on tasks with and without I/O. -# This experiment solves a computationally expensive input which brings the -# storage devices to saturation when I/O is enabled. the same input us run -# without I/O for comparison purposes.. Also, the experiments are runt for a -# range of block sizes deemed as efficient according to the granularity -# experiment. - -{ - stdenv -, stdexp -, bsc -, targetMachine -, stages -}: - -with stdenv.lib; - -let - - inherit (targetMachine) fs; - - # Initial variable configuration - varConf = { - gitBranch = [ - "garlic/tampi+send+oss+task" -# "garlic/mpi+send+omp+task" -# "garlic/mpi+send+oss+task" -# "garlic/mpi+send+seq" -# "garlic/oss+task" -# "garlic/omp+task" -# "garlic/seq" - ]; - - blocksize = [ 1 2 4 8 ]; - - n = [ - {nx=500; nz=500; ny=16000;} - ]; - - nodes = [ 1 2 4 8 16 ]; - - ioFreq = [ 9999 (-1) ]; - - }; - -# The c value contains something like: -# { -# n = { nx=500; ny=500; nz=500; } -# blocksize = 1; -# gitBranch = "garlic/tampi+send+oss+task"; -# } - - machineConfig = targetMachine.config; - - # Generate the complete configuration for each unit - genConf = with bsc; c: targetMachine.config // rec { - expName = "fwi"; - unitName = "${expName}-test"; - inherit (machineConfig) hw; - - cc = icc; - inherit (c) gitBranch blocksize; - - #nx = c.n.nx; - #ny = c.n.ny; - #nz = c.n.nz; - - # Same but shorter: - inherit (c.n) nx ny nz; - - fwiInput = bsc.apps.fwi.input.override { - inherit (c.n) nx ny nz; - }; - - # Other FWI parameters - ioFreq = c.ioFreq; - - # Repeat the execution of each unit several times - loops = 10; - #loops = 1; - - # Resources - cpusPerTask = hw.cpusPerSocket; - ntasksPerNode = 2; - nodes = c.nodes; - qos = "debug"; - time = "02:00:00"; - jobName = unitName; - - tracing = "no"; - - # Enable permissions to write in the local storage - extraMounts = [ fs.local.temp ]; - - }; - - # Compute the array of configurations - configs = stdexp.buildConfigs { - inherit varConf genConf; - }; - - exec = {nextStage, conf, ...}: stages.exec { - inherit nextStage; - pre = '' - CDIR=$PWD - if [[ "${conf.tracing}" == "yes" ]]; then - export NANOS6_CONFIG_OVERRIDE="version.instrument=ctf" - fi - EXECDIR="${fs.local.temp}/out/$GARLIC_USER/$GARLIC_UNIT/$GARLIC_RUN" - mkdir -p $EXECDIR - cd $EXECDIR - ln -fs ${conf.fwiInput}/InputModels InputModels || true - ''; - argv = [ - "${conf.fwiInput}/fwi_params.txt" - "${conf.fwiInput}/fwi_frequencies.txt" - conf.blocksize - "-1" # Fordward steps - "-1" # Backward steps - conf.ioFreq # Write/read frequency - ]; - post = '' - rm -rf Results || true - if [[ "${conf.tracing}" == "yes" ]]; then - mv trace_* $CDIR - fi - ''; - }; - - apps = bsc.garlic.apps; - - # FWI program - program = {nextStage, conf, ...}: apps.fwi.solver.override { - inherit (conf) cc gitBranch fwiInput; - }; - - pipeline = stdexp.stdPipeline ++ [ exec program ]; - -in - - stdexp.genExperiment { inherit configs pipeline; } diff --git a/garlic/exp/fwi/sync_io.nix b/garlic/exp/fwi/sync-io.nix similarity index 100% rename from garlic/exp/fwi/sync_io.nix rename to garlic/exp/fwi/sync-io.nix diff --git a/garlic/exp/index.nix b/garlic/exp/index.nix index 6b8a638..9776f3c 100644 --- a/garlic/exp/index.nix +++ b/garlic/exp/index.nix @@ -100,10 +100,9 @@ fwi = { granularity = callPackage ./fwi/granularity.nix { }; ss = callPackage ./fwi/ss.nix { }; + ss-io = callPackage ./fwi/ss-io.nix { }; reuse = callPackage ./fwi/reuse.nix { }; - - strong_scaling_io = callPackage ./fwi/strong_scaling_io.nix { }; - sync_io = callPackage ./fwi/sync_io.nix { }; + sync-io = callPackage ./fwi/sync-io.nix { }; }; osu = rec {