From 872ad1a2897cf9868a662a81261c9f76d3d35a35 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 29 Mar 2021 17:46:19 +0200 Subject: [PATCH] stdexp: allow preSrun attribute in the srun stage This option allows an experiment to inject commands before srun starts, while keeping the standard srun stage options. --- garlic/stdexp.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/garlic/stdexp.nix b/garlic/stdexp.nix index efddd96..52e8ab9 100644 --- a/garlic/stdexp.nix +++ b/garlic/stdexp.nix @@ -76,12 +76,12 @@ rec { inherit nextStage; }; - srun = {nextStage, conf, ...}: ( + srun = {nextStage, conf, preSrun ? "", ...}: ( assert (assertMsg (!(conf ? cpuBind)) "cpuBind is no longer available in the standard srun stage"); stages.srun { inherit (conf) nixPrefix; - inherit nextStage; + inherit nextStage preSrun; # Binding is set to cores always cpuBind = "cores,verbose";