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 2021-03-29 17:46:19 +02:00
parent 617ef21d38
commit 872ad1a289

View File

@ -76,12 +76,12 @@ rec {
inherit nextStage; inherit nextStage;
}; };
srun = {nextStage, conf, ...}: ( srun = {nextStage, conf, preSrun ? "", ...}: (
assert (assertMsg (!(conf ? cpuBind)) assert (assertMsg (!(conf ? cpuBind))
"cpuBind is no longer available in the standard srun stage"); "cpuBind is no longer available in the standard srun stage");
stages.srun { stages.srun {
inherit (conf) nixPrefix; inherit (conf) nixPrefix;
inherit nextStage; inherit nextStage preSrun;
# Binding is set to cores always # Binding is set to cores always
cpuBind = "cores,verbose"; cpuBind = "cores,verbose";