gpuq: bucket-backed per-GPU job queue (worker loop + submit/status helper)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Submit a job to a gpuq worker, or check queue status.
|
||||
#
|
||||
# gpuq_submit.sh <worker-id> <jobfile.sh> [more jobfiles...]
|
||||
# gpuq_submit.sh --status
|
||||
#
|
||||
# Ordering: jobs run oldest-first by NAME within a worker's queue; prefix
|
||||
# files 00_..., 01_... to force order. Load balancing is the submitter's
|
||||
# job — spread files across worker-ids (no work stealing, no races).
|
||||
|
||||
set -eu
|
||||
if [ "$1" = "--status" ]; then
|
||||
echo "== pending =="
|
||||
rclone lsf -R jspace:jspace/gpuq --include "pending/*.sh" 2>/dev/null
|
||||
echo "== done (last 20) =="
|
||||
rclone lsl -R jspace:jspace/gpuq --include "done/*.sh" 2>/dev/null | sort -k2,3 | tail -20
|
||||
exit 0
|
||||
fi
|
||||
ID=$1; shift
|
||||
for f in "$@"; do
|
||||
rclone copy "$f" "jspace:jspace/gpuq/$ID/pending/" -q
|
||||
echo "queued $(basename $f) -> $ID"
|
||||
done
|
||||
Reference in New Issue
Block a user