srun: allow commands to run before srun
This commit is contained in:
parent
8a77900201
commit
051a74b85d
@ -7,6 +7,7 @@
|
|||||||
nextStage
|
nextStage
|
||||||
, cpuBind
|
, cpuBind
|
||||||
, nixPrefix
|
, nixPrefix
|
||||||
|
, preSrun ? ""
|
||||||
, srunOptions ? ""
|
, srunOptions ? ""
|
||||||
, output ? "stdout.log"
|
, output ? "stdout.log"
|
||||||
, error ? "stderr.log"
|
, error ? "stderr.log"
|
||||||
@ -22,6 +23,9 @@ stdenv.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
cat > $out <<'EOF'
|
cat > $out <<'EOF'
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
${preSrun}
|
||||||
|
|
||||||
exec ${slurm}/bin/srun \
|
exec ${slurm}/bin/srun \
|
||||||
--mpi=pmi2 \
|
--mpi=pmi2 \
|
||||||
--cpu-bind=${cpuBind} \
|
--cpu-bind=${cpuBind} \
|
||||||
|
Loading…
Reference in New Issue
Block a user