srun: allow commands to run before srun

This commit is contained in:
Rodrigo Arias Mallo 2021-02-26 17:00:09 +01:00
parent 8a77900201
commit 051a74b85d

View File

@ -7,6 +7,7 @@
nextStage
, cpuBind
, nixPrefix
, preSrun ? ""
, srunOptions ? ""
, output ? "stdout.log"
, error ? "stderr.log"
@ -22,6 +23,9 @@ stdenv.mkDerivation rec {
installPhase = ''
cat > $out <<'EOF'
#!/bin/sh -e
${preSrun}
exec ${slurm}/bin/srun \
--mpi=pmi2 \
--cpu-bind=${cpuBind} \