Skip to content

Commit 0b60818

Browse files
sbryngelsonclaude
andcommitted
Fix job slug collision for sharded Frontier jobs
When two shards (1/2 and 2/2) of the same device/interface pair run concurrently, they generate identical job_slug values and therefore identical SBATCH -o output file names, causing concurrent writes to the same file. Append a shard suffix (e.g. "-1-of-2") to job_slug when $4 is set, making output files unique per shard. Non-sharded jobs (empty $4) are unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 468fcf3 commit 0b60818

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/frontier/submit.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ else
2828
fi
2929

3030

31-
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2-$3"
31+
shard_suffix=$([ -n "$4" ] && echo "-$(echo "$4" | tr '/' '-of-')" || echo "")
32+
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2-$3${shard_suffix}"
3233
output_file="$job_slug.out"
3334

3435
submit_output=$(sbatch <<EOT

.github/workflows/frontier_amd/submit.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ else
2828
fi
2929

3030

31-
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2-$3"
31+
shard_suffix=$([ -n "$4" ] && echo "-$(echo "$4" | tr '/' '-of-')" || echo "")
32+
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2-$3${shard_suffix}"
3233
output_file="$job_slug.out"
3334

3435
submit_output=$(sbatch <<EOT

0 commit comments

Comments
 (0)