Merge bscpkgs into jungle #189

Manually merged
rarias merged 1013 commits from merge-bscpkgs into master 2025-10-07 16:12:34 +02:00
4 changed files with 47 additions and 1 deletions
Showing only changes of commit 71c06d02da - Show all commits

View File

@@ -76,6 +76,7 @@
stages = {
sbatch = callPackage ./stages/sbatch.nix { };
srun = callPackage ./stages/srun.nix { };
baywatch = callPackage ./stages/baywatch.nix { };
control = callPackage ./stages/control.nix { };
exec = callPackage ./stages/exec.nix { };
script = callPackage ./stages/script.nix { };

View File

@@ -0,0 +1,26 @@
{
stdenv
, garlicTools
}:
{
nextStage
}:
with garlicTools;
stdenv.mkDerivation rec {
name = "baywatch";
phases = [ "installPhase" ];
preferLocalBuild = true;
dontPatchShebangs = true;
installPhase = ''
cat > $out <<'EOF'
#!/bin/sh -e
${stageProgram nextStage}
echo $? >> .srun.rc.$SLURM_PROCID
EOF
chmod +x $out
'';
}

View File

@@ -35,6 +35,21 @@ stdenv.mkDerivation rec {
${srunOptions} \
${nixPrefix}${stageProgram nextStage}
>&2 echo srun exit code: $?
# Ensure that none failed, as srun fails to capture errors
# after MPI_Finalize
for i in $(seq 0 $(($SLURM_NTASKS - 1))); do
if [ ! -e .srun.rc.$i ]; then
>&2 echo "missing exit code for rank $i, aborting"
exit 1
fi
if ! grep -q '^0$' .srun.rc.$i; then
>&2 echo "non-zero exit for rank $i, aborting"
exit 1
fi
done
${postSrun}
EOF

View File

@@ -99,13 +99,17 @@ rec {
inherit nextStage;
}
);
baywatch = {nextStage, ...}: stages.baywatch {
inherit nextStage;
};
};
stdPipelineOverride = {overrides ? {}}:
let
stages = stdStages // overrides;
in
with stages; [ sbatch isolate control srun isolate ];
with stages; [ sbatch isolate control srun isolate baywatch ];
stdPipeline = stdPipelineOverride {};