24 lines
781 B
Bash
Executable File
24 lines
781 B
Bash
Executable File
#!/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
|