From 78b96c1bc6c9b1b64e1fc456f4ccc71d906000d4 Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 30 Sep 2020 18:34:14 +0200 Subject: [PATCH] saiph: including reservation option --- garlic/exp/saiph/numcomm.nix | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/garlic/exp/saiph/numcomm.nix b/garlic/exp/saiph/numcomm.nix index 9c306dc..07e108c 100644 --- a/garlic/exp/saiph/numcomm.nix +++ b/garlic/exp/saiph/numcomm.nix @@ -44,14 +44,23 @@ let w = runWrappers; - sbatch = {stage, conf, ...}: with conf; w.sbatch { - program = stageProgram stage; - exclusive = true; - time = "02:00:00"; - qos = "debug"; - jobName = "saiph"; - inherit nixPrefix nodes ntasksPerNode; - }; + sbatch = {stage, conf, ...}: with conf; w.sbatch ( + # Allow a user to define a custom reservation for the job in MareNostrum4, + # by setting the garlic.sbatch.reservation attribute in the + # ~/.config/nixpkgs/config.nix file. If the attribute is not set, no + # reservation is used. The user reservation may be overwritten by the + # experiment, if the reservation is set like with nodes or ntasksPerNode. + optionalAttrs (pkgs.config ? garlic.sbatch.reservation) { + inherit (pkgs.config.garlic.sbatch) reservation; + } // { + program = stageProgram stage; + exclusive = true; + time = "02:00:00"; + qos = "debug"; + jobName = "saiph"; + inherit nixPrefix nodes ntasksPerNode; + } + ); control = {stage, conf, ...}: with conf; w.control { program = stageProgram stage;