Template repository for benchmarking.
- Go straight to scratch (first figure out where it is, on
lumiyou can typelumi-workspacesto see relevant scratch folders)... Because creating env in your home directory might result in a disk quota exceeded error. In some cases, disk storage is limited to 100K files and the environment cannot be created. Defaultuv cacheto scratch too by adding those lines to your~/.bashrc.
SCRATCH=<project_scratch_dir>
CACHE_DIR=$SCRATCH/.uv-cache
TMPDIR=$SCRATCH/.tmp- Clone the repository
git clone https://github.com/MeteoSwiss/mch-anemoi-benchmarks.git- Create a new branch (for example,
lumi-proposal)
git switch --create <your-branch-name>-
Install
uv(seeuvdocumentation for more details) -
Sync
uvenvironment
cd anemoi-hpc-benchmarks
uv venv -p 3.11
uv sync- Copy credentials from CSCS:
scp -r ~/.config/anemoi <username>@<hpc_address>://users/<username>/.config- Download data for emulator experiments from the anemoi catalog:
anemoi-datasets copy s3://ml-datasets/mch-co2-an-archive-0p02-2015-2020-6h-v3-pl13.zarr . --resumeand global 6-hourly data:
anemoi-datasets copy s3://ml-datasets/aifs-od-an-oper-0001-mars-n320-2016-2023-6h-v8.zarr . --resume- Download the data for the interpolator from the anemoi catalog:
anemoi-datasets copy s3://ml-datasets/mch-co2-an-archive-0p02-2015-2020-1h-v3-pl13.zarr . --resumeand global hourly data:
anemoi-datasets copy s3://ml-datasets/aifs-ea-an-oper-0001-mars-o96-1979-2022-1h-v4.zarr . --resume- Write benchmarking config your usecase, save them in
config(stageC_benchmark, etc); limit training to 1 epoch and a portion of the dataset. Set sanity steps to 0 to avoid latency at the start of training. - Copy
example_run_scaling.shand adjust the config name. Run it. - Compute wall times for each node number and number of GPUs using
elapsed_from_logs.py. The script will save the wall times inresultstext file. - Print benchmarks with
scaling.py. Results should look like this:
| GPUs | Wall Time(s) | Speed-up | Efficiency | Job ID |
|---|---|---|---|---|
| 1 | 18683.27 | 1.00 | 1.00 | 1412346 |
| 4 | 9567.43 | 1.95 | 0.98 | 1412347 |
| 8 | 7869.86 | 2.37 | 0.79 | 1412348 |
| 16 | 6015.32 | 3.11 | 0.78 | 1412349 |