|
DisCostiC v2.0.0
Distributed Cost in Cluster: a cross-architecture simulator for massively parallel MPI programs
|
likwid_bench_auto.sh submits a SLURM job that runs kerncraft's likwid_bench_auto benchmark suite on a compute node, then automatically reformats the raw output into the kerncraft node-level machine-file layout. Two YAML files are produced per run: the raw benchmark output and a formatted version ready for use with kerncraft performance models.
The job must run on a real compute node (not a login node) so that:
Wall-time note: Full benchmarking across all cache levels and core counts can exceed 24 hours. The default
--timein the script is a short placeholder (00:05:00) — always override it with--timeon thesbatchcommand. For runs expected to exceed the standard wall-time limit, request a dedicated or reserved node through NHR FAU support before submitting.
The module names, versions, and load order in this script are specific to the NHR Helma cluster. Each Helma node contains two AMD EPYC 9965 processors, each with 192 cores. The benchmark targets a single processor (192 cores), not the full node (384 cores). On any other HPC system the module stack will differ — software names, version numbers, and dependency constraints vary between clusters and change over time as the system software is updated. Before running on a different system:
module avail python, module avail likwidmodule listThe script writes SLURM logs to outputs/logs/ and outputs/errors/. Create these directories once in your project root before the first submission:
The outputs/ directory is listed in .gitignore and will not appear in git status.
Both flags must be provided on the sbatch command line. The job aborts immediately if either is missing.
| Flag | Description |
|---|---|
--cpus-per-task=N | Number of CPUs to allocate. SLURM sets $SLURM_CPUS_PER_TASK; srun reads it automatically. |
--cpu-freq=FREQ | CPU frequency spec. SLURM sets $SLURM_CPU_FREQ; srun enforces it at the task-step level. |
FREQ follows the format <min_kHz>-<max_kHz>:<governor>. Setting min and max to the same value pins the frequency; performance disables turbo scaling. For a single Helma processor (AMD EPYC 9965, 192 cores) the nominal clock is 2.25 GHz: 2250000-2250000:performance.
| Position | Variable | Default | Description |
|---|---|---|---|
$1 | OUT | machine-files/<timestamp>-machine-file.yml | Output path for the raw machine-model YAML |
The timestamp in the default filename is generated at job start in the format YYYYMMDD_HHMMSS, e.g. machine-files/20250427_143012-machine-file.yml.
#SBATCH defaultsThese apply when the corresponding flag is not passed on the sbatch command line. --cpus-per-task and --cpu-freq are intentionally absent — both are required and must always be provided explicitly.
| Directive | Default | Note |
|---|---|---|
--partition | cpu | |
--time | 00:05:00 | Placeholder — always override; full runs take up to 24 h |
| Variable | Default | Description |
|---|---|---|
LIKWID_BENCH_AUTO_EXTRA | (empty) | Extra flags forwarded to kerncraft.machinemodel |
After the benchmark finishes, the script runs an inline Python reformatter that converts the raw likwid_bench_auto YAML output into the kerncraft node-level machine-file layout (field ordering and structure compatible with existing machine files such as Zen2_EPYC-7452.yml).
The formatted file is written next to the raw file with a _formatted suffix:
| Raw output | Formatted output |
|---|---|
machine-files/20250427_143012-machine-file.yml | machine-files/20250427_143012-machine-file_formatted.yml |
machine-files/helma_epyc9965.yml | machine-files/helma_epyc9965_formatted.yml |
The benchmarks: block (kernels and measurement arrays) is preserved verbatim from the raw file — the reformatter only reorders and restructures the surrounding metadata.
Dependencies: the reformatter requires PyYAML (import yaml). The script installs it automatically in user space (pip install --user pyyaml) if it is not already available, in the same way kerncraft is handled.
| File | Path |
|---|---|
| Raw machine-model YAML | machine-files/<timestamp>-machine-file.yml |
| Formatted machine-model YAML | machine-files/<timestamp>-machine-file_formatted.yml |
| SLURM stdout log | outputs/logs/likwid_bench_auto.o<jobid> |
| SLURM stderr log | outputs/errors/likwid_bench_auto.e<jobid> |