From f842f1e01dfa0a4b4da9ad5324524bd882de9b5d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Tue, 6 Apr 2021 15:28:27 +0200 Subject: [PATCH] slurm: add sigsegv experiment Ensure that we can catch a sigsegv signal before and after the MPI_Finalize call. --- garlic/exp/index.nix | 1 + garlic/exp/slurm/sigsegv.nix | 59 ++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 garlic/exp/slurm/sigsegv.nix diff --git a/garlic/exp/index.nix b/garlic/exp/index.nix index 8c02c8e..4183763 100644 --- a/garlic/exp/index.nix +++ b/garlic/exp/index.nix @@ -91,6 +91,7 @@ slurm = { cpu = callPackage ./slurm/cpu.nix { }; + sigsegv = callPackage ./slurm/sigsegv.nix { }; }; lulesh = { diff --git a/garlic/exp/slurm/sigsegv.nix b/garlic/exp/slurm/sigsegv.nix new file mode 100644 index 0000000..db1830a --- /dev/null +++ b/garlic/exp/slurm/sigsegv.nix @@ -0,0 +1,59 @@ +{ + stdenv +, stdexp +, bsc +, targetMachine +, stages +, garlicTools +}: + +with stdenv.lib; +with garlicTools; + +let + + machineConfig = targetMachine.config; + + inherit (machineConfig) hw; + + # Initial variable configuration + varConf = { + when = [ "before" "after" "never" ]; + }; + + # Generate the complete configuration for each unit + genConf = c: targetMachine.config // rec { + expName = "sigsegv"; + unitName = expName + "-" + when; + + inherit (machineConfig) hw; + inherit (c) when; + + loops = 3; + + # Resources + qos = "debug"; + cpusPerTask = 1; + ntasksPerNode = hw.cpusPerNode; + nodes = 1; + jobName = unitName; + }; + + # Compute the array of configurations + configs = stdexp.buildConfigs { + inherit varConf genConf; + }; + + exec = {nextStage, conf, ...}: with conf; stages.exec { + inherit nextStage; + env = "date"; + argv = [ conf.when ]; + }; + + program = {nextStage, conf, ...}: bsc.test.sigsegv; + + pipeline = stdexp.stdPipeline ++ [ exec program ]; + +in + + stdexp.genExperiment { inherit configs pipeline; }