From ed932c9921692596f70cd531e90bbb3ed8eb199f Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 1 Mar 2021 11:58:23 +0100 Subject: [PATCH] osu: add bw test --- garlic/exp/index.nix | 2 ++ garlic/exp/osu/bw.nix | 59 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 garlic/exp/osu/bw.nix diff --git a/garlic/exp/index.nix b/garlic/exp/index.nix index 736eae8..6d4c2a5 100644 --- a/garlic/exp/index.nix +++ b/garlic/exp/index.nix @@ -100,5 +100,7 @@ latencyShm = latency.override { interNode = false; }; latencyMt = latency.override { enableMultithread = true; }; latencyMtShm = latency.override { enableMultithread = true; interNode = true; }; + bw = callPackage ./osu/bw.nix { }; + bwShm = bw.override { interNode = false; }; }; } diff --git a/garlic/exp/osu/bw.nix b/garlic/exp/osu/bw.nix new file mode 100644 index 0000000..47671be --- /dev/null +++ b/garlic/exp/osu/bw.nix @@ -0,0 +1,59 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages + +# Should we test the network (true) or the shared memory (false)? +, interNode ? true +}: + +with builtins; +with stdenv.lib; + +let + + machineConfig = targetMachine.config; + + # Initial variable configuration + varConf = with bsc; { + mpi = [ impi bsc.openmpi mpich ]; #psmpi ]; + }; + + # Generate the complete configuration for each unit + genConf = with bsc; c: targetMachine.config // rec { + inherit (machineConfig) hw; + nodes = if interNode then 2 else 1; + ntasksPerNode = if interNode then 1 else 2; + cpusPerTask = 1; + time = "00:10:00"; + qos = "debug"; + loops = 30; + expName = "osu-bw-${mpi.name}"; + unitName = expName; + jobName = expName; + inherit (c) mpi; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + + program = "${nextStage}/bin/osu_bw"; + }; + + program = {nextStage, conf, ...}: bsc.osumb.override { + # Use the specified MPI implementation + inherit (conf) mpi; + }; + + pipeline = stdexp.stdPipeline ++ [ exec program ]; + +in + + stdexp.genExperiment { inherit configs pipeline; }