/hpc-rikyu:rikyu-submitting-jobsfrom hpc-rikyu
Use when the user wants to run, submit, or launch a job on RIKYU (RIKEN AI4S / GB200). Covers partition/queue selection, JobSpec construction, submission, and known gotchas specific to this facility.
Ships in hpc-rikyu. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every tool call in this skill uses facility="rikyu".
gpu partition; you
don't choose a partition per GPU count, you request the total GPUs for
the job and Slurm places it. Use get_facility(facility="rikyu") for
the exact table, but the rule: only 1, 2, 3, 4, 8, 12, or 16 GPUs
are accepted (1-4 fit on one node; 8/12/16 span 2/3/4 nodes at 4
GPUs/node). Each GPU brings 36 CPU cores and ~400GB combined memory —
ask for more GPUs to get more of both, don't try to raise --mem
independently. submit_job rejects any other count with a clear error
before it ever reaches Slurm.fs_upload(facility="rikyu", ...) /
fs_mkdir(facility="rikyu", ...) (paths are relative to the home
directory unless absolute).submit_job(facility="rikyu", spec=...).
Example (2-GPU job, single node — leave node_count at its default so
Slurm derives placement from gpus):
{
"name": "train-vit",
"executable": "module load nvhpc-hpcx && mpirun -np 2 python train.py",
"directory": "/home/<user>/experiments/vit",
"resources": {"gpus": 2, "processes_per_node": 2},
"attributes": {"duration": "12:00:00", "queue_name": "gpu"}
}
Leave attributes.queue_name blank if you like — RIKYU's only
partition, gpu, is filled in automatically.get_job_status(facility="rikyu", job_id=...) right after
submission. queued with a message explains any wait. Once it runs, read
<workdir>/slurm-<job_id>.out with fs_tail — take workdir from the
status record rather than assuming $HOME.Verified live: srun fails to launch MPI ranks on RIKYU — MPI_Init
aborts with an internal-runtime failure, even though srun --mpi=list
shows pmi2/pmix plugins registered. Launch MPI programs with mpirun
instead, after loading an MPI-capable module (nvhpc-hpcx or
nvhpc-hpcx-cuda13, not nvhpc-nompi):
module load nvhpc-hpcx && mpirun -np <n> ./a.out.
Set resources.processes_per_node to match your rank count — mpirun
reads available task slots from the Slurm allocation, and a job that only
requests GPUs without also setting processes_per_node gets just 1 slot,
so mpirun -np 2 (or more) fails with "not enough slots" before it even
starts. This is unrelated to the srun issue above; both single-node and
real multi-node mpirun launches work correctly once slots are sized
right — verified live with a real 2-node, 8-rank job (gpus: 8, processes_per_node: 4), no hostfile or extra setup needed. (srun itself
is still fine for non-MPI use — interactive salloc/srun --pty, or
attaching to a running job with srun --overlap --jobid <id> for
diagnostics like nvidia-smi; the failure is specifically MPI rank
bootstrap.)
get_facility if the user omits duration. Format
HH:MM:SS or D-HH:MM:SS.module load … at the start of executable): nvhpc
standard; nvhpc-hpcx (or nvhpc-hpcx-cuda13) for multi-node MPI over
InfiniBand; nvhpc-nompi when the user manages MPI; nvhpc-byo-compiler
to use the system GCC instead.. /shared/software/spack-1.2.0/share/spack/setup-env.sh && spack load <package> before running, e.g. quantum-espresso, gromacs, lammps.
Loading a Spack package does not request GPUs by itself — the JobSpec's
gpus still has to ask for them./tmp on the compute node, 1.5TB per requested
GPU, xfs, auto-deleted when the job ends. Stage datasets/checkpoints
there for I/O-heavy work and copy results back to /home/<user> or the
group area (/data1/<group>) before the script exits.salloc/srun --pty hold allocations open —
use run_command_on_cluster only for short non-interactive checks;
prefer batch jobs.srun — MPI_Init fails; use mpirun instead.resources.processes_per_node —
mpirun will fail with "not enough slots" even though the job runs fine.Put "account": "<project>" in attributes on every job. RIKYU rejects a
job from a multi-project user that omits it:
[AI4S] You belong to multiple projects, so the project to be charged must be specified explicitly.
It is optional only for someone in exactly one project, and harmless there,
so set it unconditionally instead of deciding. get_projects(facility="rikyu")
lists the user's projects (the rkp* groups); if they have several and
haven't said which to charge, ask rather than picking one — it is a billing
decision at 300 yen/GPU-hour. RIKYU_ACCOUNT or defaults.account in
~/.hpc-agent/rikyu.json supplies it automatically when set.
submit_job(facility="rikyu", spec=spec) — show the user the spec
(or a plain-language description of it) before submitting, unless
they've explicitly said to just run it. No exceptions for this call.{"job_id": ..., "script_path": ...} — the rendered script
is kept on the cluster; fs_view(facility="rikyu", path=script_path)
to inspect exactly what was submitted.get_resources(facility="rikyu") (live occupancy) and
get_facility(facility="rikyu") (static limits) — don't guess.~/agent/work/<descriptive-name>/, never in the
home-directory root. ~/agent/ is the agent's visible scratch area —
~/agent/jobs already holds every submitted script — and the home
root stays the user's own.spec.directory with fs_mkdir before submission.
Schedulers enter that directory before the script body and pre_launch
runs, so a mkdir in pre_launch is too late.search_docs(facility="rikyu", query=...) on the hpc-docs
server. It searches a bundled guide, not a live site — never invent a URL
to send the user to.cancel_job without confirming with the user first.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub william-dawson/hpc-rookery --plugin hpc-rikyu7 skills in this plugin
/rikyu-configuringUse when the user wants to set up, configure, or troubleshoot RIKYU (RIKEN AI4S / GB200) — SSH access, the embedding endpoint for docs search (RAG), or the ~/.hpc-agent/rikyu.json file. Also use when rikyu tools fail with connection or embedding errors./rikyu-demoInteractive demo of RIKYU (RIKEN AI4S / GB200) — walks through configuration, facility info, live cluster status, docs search, filesystem access, and a real job end to end./rikyu-monitoring-jobsUse when the user asks about the status, progress, output, history, or failure of jobs on RIKYU (RIKEN AI4S / GB200), or about queue and node availability. Also use this any time you (the agent) need to check on or wait for a job you submitted, even without a fresh user request./rikyu-referenceUse to answer questions about RIKYU (RIKEN AI4S / GB200) itself — hardware, partitions, storage, software, policies, or where to get help. Ground answers in the bundled guide and live tool output rather than prior knowledge./rikyu-remote-commandUse when the user wants to run one or more shell commands on RIKYU (RIKEN AI4S / GB200)'s login node, or when another workflow needs run_command_on_cluster for a live check not covered by a safer typed tool. Requires an exact command preview and explicit user permission before execution./rikyu-reproducingUse when the user asks to make a result on RIKYU (RIKEN AI4S / GB200) reproducible, shareable, or turned into a notebook/script — or proactively suggest it after a chunk of exploratory job/file work that produced something worth preserving. Builds a Jupyter notebook that replays the real workflow via hpc_agent_core.client, not a hand-copied SSH script.