Skip to main content

MPI execution and strong scaling

User documentation · CLI reference

Kernel tuning finds compiler options; a strong-scaling study measures fixed options across GPU counts and decompositions. Your application owns its problem size, model initialization and source/receiver geometry. Warper does not resize an existing application.

Tune kernels first

Run the application in its normal environment, then wrap its Operator:

python3 -m warper Forward \
  --optimize-for 30m -- python3 app.py -d 512 512 512

Replace Forward, app.py and the application arguments, keeping the application’s usual MPI environment. Warper launches its MPI processes; invoke one coordinator directly.

Start a scaling study

Name a completed kernel-tuning baseline and select an allocation:

# One node: detect allocated NUMA domains or GPUs.
python3 -m warper --strong-scale-from SESSION --single-node

# Hosts: detect the allocated resources on every node.
python3 -m warper --strong-scale-from SESSION --hostfile hosts

The baseline selects the CPU or CUDA backend. On one node, Warper tests doubling resource counts through the detected limit, including that limit: six NUMA domains gives 1, 2, 4, 6 ranks. Each CPU rank uses one NUMA domain; each CUDA rank uses one GPU. With multiple hosts, Warper tests doubling node counts through the hostfile’s full allocation, using the detected NUMA/GPU count on each node. Allocated resource counts must match across hosts. Blank lines and comments do not count as hosts; aliases resolving to the same machine are rejected. Hostfile slots and max_slots describe CPU slots, never GPU counts.

Scaling completes its experiment matrix without --optimize-for. Interrupt and resume to continue later. The application recorded in the baseline is reused; an optional command after -- can select a different fixed problem size:

python3 -m warper --strong-scale-from SESSION --single-node -- \
  python3 app.py -d 1024 1024 1024

The application arguments choose each phase’s grid. For example, tune on a 512³ grid, then supply a 768×768×1024 grid to the scaling command. Scaling constructs its correctness reference for that larger workload; its speedup uses the scaling study’s own serial point. The GUI reports the captured global Grid.shape separately for tuning and each scaling campaign.

Results attach to that same session. Kernel tuning retains its results and profiler reports. Single-node strong scaling and Multi-node strong scaling appear when available; one campaign of each scope may share a baseline. A one-host file produces a single-node campaign. --scaling-scope can validate the intended scope or select a campaign on resume.

For these 3-D examples, Warper enumerates legal Cartesian decompositions, including axis permutations, within the supplied allocation. Each topology runs with diag2, overlap2 and overlap3. The default is three measured repeats and one warmup per mode, or nine measurements per topology.

Prepare the allocation

CUDA scaling requires Open MPI, Linux CPU affinity, NVIDIA CUDA UUIDs and shared application/artifact paths on every selected host. Your allocation must expose enough GPUs and physical CPU cores for the requested points. Ranks use distinct GPUs and disjoint nearby cores. Missing locality prevents execution; occupied GPUs wait within the admitted budget. Foreign GPU activity or unavailable ownership checks can invalidate a sample.

Keep the application, dependencies and allocation available for resume. Recorded transport settings are forwarded to ranks and checked on recovery. Unsupported compiler or placement capabilities receive explicit diagnostics.

The current scaling controller supports compute applications. Sources with a separate saving/I/O configuration are rejected explicitly.

Measurements

Every point validates the frozen Operator against an independent safe reference. The global problem, timestep horizon and compiler options stay fixed. A correctness-checked warmup precedes measurements. Runtime and GPts/s come from Devito’s Global performance <w/o setup>. With a time-loop timer, Devito uses the longest elapsed time for the complete loop across MPI ranks. Operators without a time loop and older compiled Operators use the sum of the longest rank time for each section. Saved studies keep the measurements they recorded.

A repeat spread exceeding 5% of the median is reported as variable. Inspect contention and clocks as well as rank placement. The dashboard distinguishes the fastest stable point from a faster variable result and retains all paid samples. Missing and failed measurements remain unavailable.

After the decomposition and mode sweep, Warper can test bounded transport and rank-order alternatives for selected results. These follow-ups use the selected result’s mode and frozen kernel settings.

Resume and inspect

python3 -m warper --resume SESSION --scaling-scope single-node

Resume reuses completed samples. Saved studies retain their original budget policy. A completed study runs no more execution work; inspection needs no MPI or NCU installation. An unfinished study needs its recorded placement and environment. Changed applications, unsupported mappings or changed allocations require a new study.

If both campaigns have pending work, select one with --scaling-scope on resume. The dashboard’s Single-node strong scaling and Multi-node strong scaling tabs appear when their campaigns exist. Each shows the MPI mode, results, repeat ranges, placement and failures for each case. Filter by GPU count, topology and MPI mode. Select one topology and keep all modes visible to compare modes at the same node layout. Speedup keeps the study-wide reference as you filter. Speedup uses the smallest measured GPU count in that study. Partial points show completed repeats without entering plots. See the GUI reference for collection and exports.

Back to top