From c5e225c7782139dc78178f53f349867bd1a574ba Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 22 Sep 2020 17:40:26 +0200 Subject: [PATCH] saiph:Remove old experiments --- garlic/exp/saiph/mpi.nix | 88 -------------------- garlic/exp/saiph/tampi.nix | 165 ------------------------------------- 2 files changed, 253 deletions(-) delete mode 100644 garlic/exp/saiph/mpi.nix delete mode 100644 garlic/exp/saiph/tampi.nix diff --git a/garlic/exp/saiph/mpi.nix b/garlic/exp/saiph/mpi.nix deleted file mode 100644 index a618f85..0000000 --- a/garlic/exp/saiph/mpi.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ - bsc -, nbody -, genApp -, genConfigs - -# Wrappers -, launchWrapper -, sbatchWrapper -, srunWrapper -, argvWrapper -, controlWrapper -, nixsetupWrapper -}: - -let - # Set the configuration for the experiment - config = { - cc = [ bsc.icc ]; - blocksize = [ 2048 ]; - mpi = [ bsc.impi bsc.openmpi bsc.mpich ]; - }; - - extraConfig = { - particles = 32*1024; - timesteps = 10; - ntasksPerNode = 2; - nodes = 1; - time = "00:10:00"; - qos = "debug"; - #mpi = bsc.impi; - #mpi = bsc.openmpi; - gitBranch = "garlic/mpi+send"; - gitURL = "ssh://git@bscpm02.bsc.es/garlic/apps/nbody.git"; - }; - - # Compute the cartesian product of all configurations - configs = map (conf: conf // extraConfig) (genConfigs config); - - sbatch = conf: app: sbatchWrapper { - app = app; - nixPrefix = "/gpfs/projects/bsc15/nix"; - exclusive = false; - ntasksPerNode = "${toString conf.ntasksPerNode}"; - nodes = "${toString conf.nodes}"; - time = conf.time; - qos = conf.qos; - chdirPrefix = "/home/bsc15/bsc15557/bsc-nixpkgs/out"; - }; - - srun = app: srunWrapper { - app = app; - nixPrefix = "/gpfs/projects/bsc15/nix"; - }; - - argv = conf: app: - with conf; - argvWrapper { - app = app; - argv = ''(-t ${toString timesteps} -p ${toString particles})''; - env = '' - export I_MPI_THREAD_SPLIT=1 - ''; - }; - - nbodyFn = conf: - with conf; - nbody.override { inherit cc mpi blocksize gitBranch gitURL; }; - - pipeline = conf: - sbatch conf ( - srun ( - nixsetupWrapper ( - argv conf ( - nbodyFn conf - ) - ) - ) - ) - ; - - # Ideally it should look like this: - #pipeline = sbatch nixsetup control argv nbodyFn; - - jobs = map pipeline configs; - -in - launchWrapper jobs diff --git a/garlic/exp/saiph/tampi.nix b/garlic/exp/saiph/tampi.nix deleted file mode 100644 index 4ec5d49..0000000 --- a/garlic/exp/saiph/tampi.nix +++ /dev/null @@ -1,165 +0,0 @@ -{ - stdenv -, nixpkgs -, pkgs -, genApp -, genConfigs -, runWrappers -}: - -with stdenv.lib; - -let - bsc = pkgs.bsc; - - # Set variable configuration for the experiment - varConfig = { - cc = [ bsc.icc ]; - mpi = [ bsc.impi bsc.openmpi ]; - blocksize = [ 1024 ]; - }; - - # Common configuration - common = { - # Compile time nbody config - gitBranch = "garlic/tampi+send+oss+task"; - - # nbody runtime options - particles = 1024*128; - timesteps = 20; - - # Resources - ntasksPerNode = "48"; - nodes = "1"; - - # Stage configuration - enableSbatch = true; - enableControl = true; - enableExtrae = false; - enablePerf = false; - enableCtf = false; - - # MN4 path - nixPrefix = "/gpfs/projects/bsc15/nix"; - }; - - # Compute the cartesian product of all configurations - configs = map (conf: conf // common) (genConfigs varConfig); - - stageProgram = stage: - if stage ? programPath - then "${stage}${stage.programPath}" else "${stage}"; - - w = runWrappers; - - sbatch = {stage, conf, ...}: with conf; w.sbatch { - program = stageProgram stage; - exclusive = true; - time = "02:00:00"; - qos = "debug"; - jobName = "nbody-bs"; - inherit nixPrefix nodes ntasksPerNode; - }; - - control = {stage, conf, ...}: with conf; w.control { - program = stageProgram stage; - }; - - srun = {stage, conf, ...}: with conf; w.srun { - program = stageProgram stage; - srunOptions = "--cpu-bind=verbose,rank"; - inherit nixPrefix; - }; - - statspy = {stage, conf, ...}: with conf; w.statspy { - program = stageProgram stage; - }; - - perf = {stage, conf, ...}: with conf; w.perf { - program = stageProgram stage; - perfArgs = "sched record -a"; - }; - - nixsetup = {stage, conf, ...}: with conf; w.nixsetup { - program = stageProgram stage; - }; - - extrae = {stage, conf, ...}: w.extrae { - program = stageProgram stage; - traceLib = "mpi"; # mpi -> libtracempi.so - configFile = ./extrae.xml; - }; - - ctf = {stage, conf, ...}: w.argv { - program = stageProgram stage; - env = '' - export NANOS6=ctf - export NANOS6_CTF2PRV=0 - ''; - }; - - argv = {stage, conf, ...}: w.argv { - program = stageProgram stage; - env = '' - set -e - export I_MPI_THREAD_SPLIT=1 - ''; - argv = ''( -t ${toString conf.timesteps} - -p ${toString conf.particles} )''; - }; - - bscOverlay = import ../../../overlay.nix; - - genPkgs = newOverlay: nixpkgs { - overlays = [ - bscOverlay - newOverlay - ]; - }; - - # We may be able to use overlays by invoking the fix function directly, but we - # have to get the definition of the bsc packages and the garlic ones as - # overlays. - - nbodyFn = {stage, conf, ...}: with conf; - let - # We set the mpi implementation to the one specified in the conf, so all - # packages in bsc will use that one. - customPkgs = genPkgs (self: super: { - bsc = super.bsc // { mpi = conf.mpi; }; - }); - in - customPkgs.bsc.garlic.nbody.override { - inherit cc blocksize mpi gitBranch; - }; - - stages = with common; [] - # Use sbatch to request resources first - ++ optional enableSbatch sbatch - - # Repeats the next stages N times - ++ optionals enableControl [ nixsetup control ] - - # Executes srun to launch the program in the requested nodes, and - # immediately after enters the nix environment again, as slurmstepd launches - # the next stages from outside the namespace. - ++ [ srun nixsetup ] - - # Intrumentation with extrae - ++ optional enableExtrae extrae - - # Optionally profile the next stages with perf - ++ optional enablePerf perf - - # Optionally profile nanos6 with the new ctf - ++ optional enableCtf ctf - - # Execute the nbody app with the argv and env vars - ++ [ argv nbodyFn ]; - - # List of actual programs to be executed - jobs = map (conf: w.stagen { inherit conf stages; }) configs; - -in - # We simply run each program one after another - w.launch jobs