/hpc-assistant-skills:energy-profilingfrom hpc-assistant-skills
Profiles GPU job energy/power consumption on AMD systems using Omnistat and VictoriaMetrics. Covers setup, Slurm job instrumentation, report-card interpretation, and troubleshooting for LUMI and Frontier.
Ships in hpc-assistant-skills. 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.
Read when SKILL.md points to them; scripts run unread.
Omnistat is a lightweight power/energy sampling daemon for AMD GPU systems. It periodically samples per-GPU (per-GCD) telemetry — utilization, memory use, temperature, power, and accumulated energy — stores it in a local VictoriaMetrics time-series database, and prints a per-job report card (energy in kWh) at the end of a Slurm job.
This is distinct from the profiling skill: rocprofv3 profiles kernel/API performance (what runs fast), while Omnistat measures energy and power over a job's lifetime (what costs energy). Use rocprofv3 to optimize kernels; use Omnistat to quantify and compare the energy cost of whole jobs and configurations.
See references for details on energy profiling in specific environments: references/omnistat-lumi.md (LUMI) and references/omnistat-frontier.md (Frontier).
For general Omnistat setup follow the steps below. For site-specific (e.g. LUMI, Frontier) details, see the respective references.
Note that some systems may already have Omnistat installed and available. On Frontier, use the preinstalled omnistat-wrapper module instead of the steps below.
Use a directory that is permanent and shared across all nodes — e.g. /scratch.
mkdir -p /scratch/users/<USERNAME>/omnistat/
cd /scratch/users/<USERNAME>/omnistat/
curl -OLJ https://github.com/ROCm/omnistat/archive/refs/tags/v1.12.0.tar.gz
tar xfz omnistat-1.12.0.tar.gz
VM_VERSION=v1.143.0
curl -OLJ https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/${VM_VERSION}/victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz
tar xfz victoria-metrics-linux-amd64-${VM_VERSION}.tar.gz
# Binary is extracted as: victoria-metrics-prod
python3 -m venv omnistat-env
omnistat-env/bin/pip install -r requirements.txt -r requirements-query.txt -e omnistat-1.12.0/
[omnistat.query]
prometheus_url = http://localhost:9090
system_name = AMD-HPC
[omnistat.collectors]
port = 8001
enable_rocm_smi = False
enable_amd_smi = True # Only one SMI GPU collector may be active at a time; either rocm_smi or amd_smi.
enable_rms = True
[omnistat.collectors.rms]
job_detection_mode = file-based
job_detection_file = /tmp/omni_rmsjobinfo_user
[omnistat.usermode]
victoria_binary = /scratch/users/<USERNAME>/omnistat/victoria-metrics-prod
victoria_datadir = data_prom
victoria_logfile = vic_server.log
export OMNISTAT_CONFIG=/scratch/users/<USERNAME>/omnistat/omnistat.config
export OMNISTAT_DIR=/scratch/users/<USERNAME>/omnistat/omnistat-env/bin
# At the start of the job — start VictoriaMetrics + local exporter.
# The samplerate flag --interval 10 samples every 10 seconds.
# Use --localjob if SSH between compute nodes is blocked, so the default SSH-based exporter launch silently fails.
$OMNISTAT_DIR/omnistat-usermode --start --interval 10 --localjob ${SLURM_JOB_ID}
# ... your srun / singularity commands here ...
# At the end of the job — stop exporters, print report card, stop VictoriaMetrics
$OMNISTAT_DIR/omnistat-usermode --stopexporters --localjob ${SLURM_JOB_ID}
$OMNISTAT_DIR/omnistat-query --job ${SLURM_JOB_ID} --interval 10
$OMNISTAT_DIR/omnistat-usermode --stopserver
# Archive the time-series DB so it isn't overwritten by the next job
mv data_prom data_prom_${SLURM_JOB_ID}
At job end Omnistat prints a per-GPU summary:
----------------------------------------------------------------------
Omnistat Report Card for Job Id: 18830188
----------------------------------------------------------------------
Job Overview (Num Nodes = 1, Machine = LUMI)
--> Start time = 2026-05-25 12:28:51
--> End time = 2026-05-25 12:30:36
--> Duration = 105 secs
GPU Statistics:
| Utilization (%) | Memory Use (%) | Temperature (C) | Power (W) | Energy (kWh) |
GPU # | Max Mean | Max Mean | Max Mean | Max Mean | Total |
---------------------------------------------------------------------------------------------------
0 | 100.00 49.75 | 3.10 1.80 | 57.00 48.70 | 393.00 273.60 | 5.10e-03 |
...
How to interpret:
Energy (kWh) column across GPUs (and nodes) for total job energy. On Frontier, power and energy may be reported per MI250X package rather than per GCD; see references/omnistat-frontier.md before summing.The archived VictoriaMetrics database is at /<OUTPUTDIR>/data_prom_<JOBID>/. User can visualize it on their local machine with the upstream "Exploring results locally" workflow (docker compose up using the docker/ directory of the Omnistat source tree) using Grafana dashboards over the collected time series.
| Symptom | Cause | Fix |
|---|---|---|
KeyError: 'omnistat.query' at query time | Missing config section | Add [omnistat.query] with prometheus_url and system_name |
No data; shutdown takes ~0.01 s; no exporter.log | SSH-based exporter launch blocked on compute nodes | Use --localjob ${SLURM_JOB_ID} on --start and --stopexporters |
| Only one SMI collector allowed / collector error | Both rocm_smi and amd_smi enabled | Set enable_amd_smi = False |
vX.Y.Z (community) buildWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/frontier-frequency-power-cappingUse when running GPU frequency-cap or power-cap experiments on Frontier (AMD MI250X). Covers the power cap in the job header (#SBATCH --gpu-power-cap, one job per cap), the max frequency changed at runtime with /usr/bin/set_gpu_max_sclk, the sclk min/max range (#SBATCH --gpu-srange), checking which caps were applied, sysfs/pm_counters telemetry, sweep planning and submission, and runtime/energy/EDP analysis. Do NOT use for rocprofv3 kernel profiling (profiling) or general Omnistat setup (energy-profiling)./frontier-resource-managementCheck Frontier allocations, storage, and project access./npx claudepluginhub silogen/hpc-assistant --plugin hpc-assistant-skillsOther plugins' skills for the same job