Skip to content

Commit

Permalink
script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Milner committed Oct 18, 2023
1 parent 89bb8d7 commit 6137dca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parallel/slurm_sbin/detect_first_running.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

squeue -t R -u $USER -o %A -h | sort | head -n 1
squeue -t R -u $USER -o "%A %j" -h | grep -v interact | awk '{print $1}' | sort | head -n 1
#squeue -t R -u $USER -o %A -h | grep -v interact | sort | head -n 1
10 changes: 10 additions & 0 deletions parallel/slurm_sbin/locate_job_stdout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ else
ID=$1
fi

if [[ ! $ID -gt 0 ]];then
echo "Job ID not supplied or not found: $ID"
exit 1
fi

DIR=`squeue -h -j $ID -o %Z`

if [[ ! -e $DIR ]];then
Expand All @@ -23,6 +28,11 @@ fi

OUT=`find $DIR -maxdepth 1 -name "*.o${ID}"`

if [[ ! -e $OUT ]];then
# try another format
OUT=`find $DIR -maxdepth 1 -name "*${ID}.out"`
fi

if [[ ! -e $OUT ]];then
echo "Output not found for $ID in $DIR: $OUT"
exit 1
Expand Down

0 comments on commit 6137dca

Please sign in to comment.