forked from rarias/bscpkgs
srun: add postSrun hook
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
, cpuBind
|
||||
, nixPrefix
|
||||
, preSrun ? ""
|
||||
, postSrun ? ""
|
||||
, srunOptions ? ""
|
||||
, output ? "stdout.log"
|
||||
, error ? "stderr.log"
|
||||
@@ -26,14 +27,17 @@ stdenv.mkDerivation rec {
|
||||
|
||||
${preSrun}
|
||||
|
||||
exec ${slurm}/bin/srun \
|
||||
${slurm}/bin/srun \
|
||||
--mpi=pmi2 \
|
||||
--cpu-bind=${cpuBind} \
|
||||
--output=${output} \
|
||||
--error=${error} \
|
||||
${srunOptions} \
|
||||
${nixPrefix}${stageProgram nextStage}
|
||||
|
||||
${postSrun}
|
||||
EOF
|
||||
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user