Skip to content

Commit

Permalink
Fix pbsdsh jobnames starting with a period
Browse files Browse the repository at this point in the history
Fix a crash that occurred when the 14 character truncation of the
filename for an egs-parallel pbsdsh job ended up starting with a '.'.
The first character is now trimmed away if that is the case, so the job
name is only 13 characters.
  • Loading branch information
rtownson authored and ftessier committed Mar 26, 2021
1 parent 58b6cd2 commit 8df4716
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions HEN_HOUSE/scripts/egs-parallel-pbs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ trim=$(( $(echo $jobname | wc -c) - 14 ))
if [ $trim -gt 0 ]; then
jobname=$(echo $jobname | cut -c $trim-)
fi
### job names can't start with a '.', hopefully the next character is OK
if [[ ${jobname::1} == "." ]]; then
jobname="${jobname:1}"
fi
log "job name: $jobname"

### remove existing egsjob and lock files
Expand Down
4 changes: 4 additions & 0 deletions HEN_HOUSE/scripts/egs-parallel-pbsdsh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ trim=$(( $(echo $jobname | wc -c) - 14 ))
if [ $trim -gt 0 ]; then
jobname=$(echo $jobname | cut -c $trim-)
fi
### job names can't start with a '.', hopefully the next character is OK
if [[ ${jobname::1} == "." ]]; then
jobname="${jobname:1}"
fi
log "job name: $jobname"

### create pbsdsh directory to store task files for job numbers (remove existing directory)
Expand Down

0 comments on commit 8df4716

Please sign in to comment.