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.
This commit is contained in:
Rodrigo Arias Mallo 2021-03-29 17:46:19 +02:00
parent 617ef21d38
commit 872ad1a289

View File

@ -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";