1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 09:15:24 +02:00

[bash] Slurm integration, check if we are in an interactive shell

This commit is contained in:
Hyacinthe Cartiaux 2017-08-24 15:32:03 +02:00
parent 4f16ae76ee
commit af8a35c539

View file

@ -9,7 +9,7 @@ __slurm_ps1_remaining_time(){
fi
}
test -n "$SLURM_PTY_PORT" && (
[[ -n "$INTERACTIVE" && -n "$SLURM_PTY_PORT" ]] && (
echo "[SLURM] SLURM_JOB_ID=$SLURM_JOB_ID"
echo "[SLURM] Your nodes are:"
srun bash -c 'echo " $(hostname)*$SLURM_CPUS_ON_NODE"' | sort -u