GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Rajrahane/gpuq

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmd/gpuq
cmd/gpuq
 
 
docs
docs
 
 
examples
examples
 
 
internal
internal
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
Dockerfile
Dockerfile
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

gpuq

A GPU-aware CLI for Slurm clusters (Slinky, Soperator, or bare metal). It talks to slurmrestd and answers the question researchers actually ask: "where can my N-GPU job run right now, and is that capacity actually healthy?"

$ gpuq --fake nodes
NODE    STATE       PARTITION  GPU   FREE/TOTAL  HEALTH  REASON
gpu-01  ALLOCATED   gpu        h100  0/8         ok      -
gpu-02  MIXED       gpu        h100  5/8         xid:63  -
gpu-03  IDLE        gpu        h100  8/8         ok      -
gpu-04  IDLE+DRAIN  gpu        h100  8/8         ok      xid 79 (GPU fell off the bus)

$ gpuq --fake fit --gpus 4          # skips gpu-02 even though Slurm says it has room
fits now:
  gpu-03  4 GPUs

$ gpuq --fake fit --gpus 16; echo $?
does not fit now: only 8 GPUs are free on usable nodes, need 16
3

Commands

Command What it does
nodes Node state, free/total GPUs, DCGM-derived health (-o json, --available)
jobs List jobs (--user, --state)
fit Can --gpus N [--nodes M] start now? Best-fit placement, fragmentation-aware. Exit 3 if not
submit -f job.yaml Submit from a YAML spec; --dry-run shows placement. Pre-flight check is advisory
watch <id> Follow a job; prints pending reasons; exit 4 if it does not complete
cancel, drain, resume Job and node operations. drain refuses if jobs are running unless --force

Configuration

Env var Meaning
GPUQ_SERVER slurmrestd URL (default http://localhost:6820)
GPUQ_USER Slurm user the JWT belongs to (default $USER)
GPUQ_TOKEN / GPUQ_TOKEN_FILE JWT, or a file containing one (re-read each request, so rotation works)
GPUQ_API_VERSION slurmrestd data plugin version (default v0.0.44)
GPUQ_PROMETHEUS_URL Enables the health column / health-aware placement via DCGM Xid metrics
GPUQ_PROM_NODE_LABEL Metric label holding the Slurm node name (default Hostname)
GPUQ_FAKE=1 Built-in demo cluster, no Slurm needed

Mint a token with scontrol token. Against a cluster running in Kubernetes, kubectl port-forward svc/<slurmrestd-service> 6820:6820 and point GPUQ_SERVER at localhost.

Layout

cmd/gpuq            entrypoint
internal/cli        commands, output formatting, exit codes
internal/slurm      domain types, Client interface, GRES/TRES/hostlist parsing
internal/slurm/restd   slurmrestd HTTP client (v0.0.44)
internal/slurm/fake    in-memory demo cluster
internal/planner    best-fit placement + "why not" explanations
internal/health     Prometheus/DCGM health source
internal/spec       YAML job spec parsing/validation

Status: read this before trusting it

  • Unit tests pass (make test), including a CLI suite against the fake cluster.
  • The slurmrestd client has never talked to a real slurmrestd. Its JSON shapes follow the v0.0.44 OpenAPI as I understand it and are exercised only against hand-written fixtures. First task: capture real responses into internal/slurm/restd/testdata/ and fix whatever differs (field names, {set,number} wrappers, node state strings).
  • The health source assumes dcgm-exporter's DCGM_FI_DEV_XID_ERRORS metric and a label that matches Slurm node names.
  • Run go mod tidy once after renaming the module: grep -rl Rajrahane . | xargs sed -i 's#github.com/Rajrahane/gpuq#github.com/<you>/gpuq#g'.

See docs/ROADMAP.md for where this goes next.

About

No description or website provided.

Topics

cligohpcnebiusslurmsoperator

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.