forked from rarias/bscpkgs
WIP: postprocessing pipeline
Now each run is executed in a independent folder
This commit is contained in:
@@ -19,7 +19,10 @@ stdenv.mkDerivation {
|
||||
cat > $out <<EOF
|
||||
#!/bin/sh
|
||||
for n in \$(seq 1 ${toString loops}); do
|
||||
mkdir "\$n"
|
||||
cd "\$n"
|
||||
${stageProgram nextStage}
|
||||
cd ..
|
||||
done
|
||||
EOF
|
||||
chmod +x $out
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
, ntasks ? null
|
||||
, ntasksPerNode ? null
|
||||
, ntasksPerSocket ? null
|
||||
, cpusPerTask ? null
|
||||
, nodes ? null
|
||||
, exclusive ? true # By default we run in exclusive mode
|
||||
, qos ? null
|
||||
@@ -60,6 +61,7 @@ stdenv.mkDerivation rec {
|
||||
+ sbatchOpt "ntasks" ntasks
|
||||
+ sbatchOpt "ntasks-per-node" ntasksPerNode
|
||||
+ sbatchOpt "ntasks-per-socket" ntasksPerSocket
|
||||
+ sbatchOpt "cpus-per-task" cpusPerTask
|
||||
+ sbatchOpt "nodes" nodes
|
||||
+ sbatchOpt "chdir" chdir
|
||||
+ sbatchOpt "output" output
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
, cpuBind
|
||||
, nixPrefix
|
||||
, srunOptions ? ""
|
||||
, output ? "stdout.log"
|
||||
, error ? "stderr.log"
|
||||
}:
|
||||
|
||||
with garlicTools;
|
||||
@@ -23,6 +25,8 @@ stdenv.mkDerivation rec {
|
||||
exec ${slurm}/bin/srun \
|
||||
--mpi=pmi2 \
|
||||
--cpu-bind=${cpuBind} \
|
||||
--output=${output} \
|
||||
--error=${error} \
|
||||
${srunOptions} \
|
||||
${nixPrefix}${stageProgram nextStage}
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user