Original paperSourceNo author review
Make your paper interactiveCreate

Text from the interactive explanation

POLAR-PIC: A Holistic Framework for Matrixized PIC with Co-Designed Compute, Layout, and Communication

Rao, Yizhuo, Cui, Xingjian, Pang, Shangzhi, Xie, Jiabin, Feng, Guangnan, Wei, Jinhui, Zhang, Ziyan, Gao, Languang, Wang, Zhenyu, Chen, Zhiguang, Lu, Yutong

POLAR-PIC · HPDC ’26 · an interactive explainer

Once in space , where it flies through a plasma, and once in memory , where a computer stores it. Matrix hardware runs fast only when the two orders agree. POLAR-PIC keeps them in step inside a write the simulation must do anyway, then hides the particle mail behind other work.

0 Twin worlds

1 The loop

2 Outer products

3 Sort-on-Write

4 Hidden mail

5 Measured

1 · One timestep, three mismatches

Particles talk to a grid, four times a step

A Particle-in-Cell (PIC) code tracks billions of charged “macro-particles” that move freely, while electric and magnetic fields live on a fixed grid. Every timestep cycles through four phases. Particle–grid interaction alone often takes more than 80% of the runtime.

Interpolation & Push

Each particle gathers E and B from nearby grid nodes (a weighted sum over a stencil), then the Lorentz force moves it.

Deposition

Each particle scatters its current back onto the grid. Many particles write to the same nodes, so writes collide.

Field solve

Maxwell’s equations update E and B on the grid (the Yee solver), with halo exchanges between neighbouring processes.

Redistribute

Particles that crossed into another tile or process are found, packed, sent and unpacked: a blocking barrier at the end of the step.

01Compute mismatch

Interpolation is an inner product : many grid values reduce into one particle’s answer. A Matrix Processing Unit (MPU) does the opposite, an outer product : two vectors expand into a whole 8 × 8 tile per instruction.

02Layout mismatch

The MPU wants eight particles from the same cell sitting side by side in memory. Particles keep moving, so memory order decays. Index-based sorting keeps a list but leaves the data fragmented; global sorts cost a full pass.

03Communication mismatch

Mainstream codes treat redistribution as a bulk-synchronous barrier: scan, pack, send, wait, unpack. Under heavy migration, and across thousands of nodes, that wait grows.

2 · Compute · matrixized field interpolation

Turn eight dot products into outer products

For one particle, interpolation is a dot product between its K stencil weights and the K field vectors around it. Done particle by particle, that is a long chain of small vector operations.

POLAR-PIC stacks N = 8 particles from the same cell into a weight matrix W (N × K) and the field vectors into G (K × D). The batch result is one matrix product, which can be expanded as a sum of rank-1 outer products, one per stencil node:

Each term is exactly what an MPU’s MOPA (Matrix Outer-Product Accumulate) instruction does: it multiplies a column by a row and adds the 8 × 8 result into an on-chip tile. In 3D with cubic shape factors, K = 4³ = 64 nodes and D = 6 field components (Ex, Ey, Ez, Bx, By, Bz), zero-padded to the tile width of 8. Cells with fewer than 8 particles are zero-padded too, which is why matrix variants lose at 1 particle per cell.

Live mathThis machine computes real cubic B-spline weights on a 2D slice (K = 4 × 4 = 16 nodes) and an illustrative field. Drag the particles. “Instructions” count issue steps in this sketch: one per weighted vector update (vector mode) or one per outer product (matrix mode).

3 · Layout · Sort-on-Write

Sort during the write you must do anyway

After the push, every particle’s new state has to be written back to memory. POLAR-PIC uses that unavoidable write to sort.

Two buffers per tile. Particles are read from P_cur and written to P_next; the pointers swap every step, so nothing is reallocated.

Read cell by cell. A cell’s residents are one contiguous run in the Ordered Region ; last step’s movers sit in a short Disordered tail , found through a small index (bin_to_ip) built by an O(Ntail) binning pass.

Classify in registers. After the push, a SIMD mask marks each particle: 1 = still in the same cell, 0 = moved.

Stream-split. Residents are compact-stored at ptr_ord, growing from the front. Movers are stored at ptr_dis, growing back from the end.

Pre-pack the mail. Movers that left the tile are copied straight from registers into a local receive buffer or a remote send buffer, ready for the network.

Self-heal. Next step, tail particles are gathered by cell and, if they stay, written into the Ordered Region. Leavers sit in the tail, so deleting them is a pointer truncation.

MeasuredThe fused write-back removed ≥ 99% of the standalone scan-and-pack stage: the absorbed packing cost 0.146 s (3.3% of interpolation time) versus 12.869 s of exposed packing in the baseline (uth = 0.01). Reusing the layout cut Deposition’s sorting cost by 83.5% versus logical indexing, and at uth = 0.2 index-guided physical reordering costs 1.19× more than SoW’s tail sorting.

4 · Communication · overlap with Deposition

Post the mail early, read it later

A particle’s new position is known as soon as the push ends, and Deposition does not change which process owns it. So the migrants, already packed during Sort-on-Write, can leave right away. POLAR-PIC fires one non-blocking UNR_batch_put: the network card copies the data straight into the neighbour’s memory (one-sided RDMA) while the CPU deposits current. A single UNR_Wait after Deposition collects the arrivals.

SchematicBar lengths are illustrative units chosen to show the ordering of events, not measured durations. MeasuredUNR-based overlap reached a 99.1% overlap ratio, against 82.3% for MPI non-blocking calls, and cut the maximum per-rank wait to 0.01 s (58× lower than MPI). The bulk-synchronous baseline’s communication latency surged more than 14× at uth = 0.2. Pushing the overlap into the field solve made particle traffic contend with field communication: a 2.25× longer latency tail than stopping at Deposition.

5 · What the authors measured

On the LS pilot system

POLAR-PIC is built on WarpX v24.07 and was measured on the pilot system of an Exascale supercomputer: nodes with two LX2 CPUs, each with more than 256 cores carrying both vector units and 8 × 8 FP64 matrix units (MOPA offers about 4× the vector unit’s theoretical FP64 throughput). Speedups count the particle phase: interpolation, deposition and redistribution. Comparisons use 2 nodes (32 MPI ranks × 32 OpenMP threads), cubic shape factors, a Yee solver and a Boris pusher.

Uniform plasma: density sweep

Particle-phase time at uth = 0.01 for 100 steps on a 256 × 128 × 128 grid (Table 2). Pick a particles-per-cell value.

Ablation ladder: which ingredient matters?

Speedups at 512 particles per cell, uth = 0.01 (Table 3). Click a bar or step through.

Weak scaling to more than 2 million cores

End-to-end full timestep, uniform plasma at 512 particles per cell under the most turbulent setting (uth = 0.2), each node keeping the same work. Curves are approximate readings of Figure 12; the end points are as reported.

Both stay above 90% up to 16 nodes. Beyond that, blocking redistribution stops hiding interconnect latency for WarpX, while POLAR-PIC’s particle components stay near 100% (WarpX’s fall to 62.8%). The lesson is Amdahl’s law: with particles fast, the field solver becomes the dominant remaining cost, the authors’ next target.

Laser-ion acceleration

A production-style case: a 30 fs, a0 = 16 laser hits a 50 nm target, so particle density is very uneven and migration is heavy. POLAR-PIC is 3.8× faster than Matrix-PIC, redistribution runs 3.0× faster than the baseline, and accumulated long-tail latency drops by 34.6% (38.3% versus Matrix-PIC).

Same physics

After 2,000 laser-ion steps, the electron phase space matches native WarpX (mean absolute error 0.84 mec against peak momenta above 100 mec). Total charge, energy and longitudinal momentum errors stay bounded throughout; the residual comes from the changed floating-point summation order.

Share of peak

POLAR-PIC’s particle phase reaches 13.2% of the LX2’s theoretical peak (native WarpX on LX2: about 1%; Matrix-PIC: 5.5%). WarpX’s CUDA version reaches 9.6% on NVIDIA A800 GPUs. The authors give this only as context, since the platforms and software stacks differ.

Source & credits

The paper

The interactive models on this page are simplified 2D illustrations built for explanation: the twin-worlds plasma and the Sort-on-Write stepper are toy simulations, the communication timeline is schematic, and the interpolation machine computes exact 2D weights on an illustrative field. All performance numbers are the authors’ measurements as reported in the paper. Explainer by iPaper.ai (iPaper.ai).

Glossary

PIC Particle-in-Cell: particles move freely; fields live on a grid.

VPU / MPU Vector and Matrix Processing Units: SIMD lanes versus 2D tile engines.

MOPA Matrix Outer-Product Accumulate: C ← C + a ⊗ b in one instruction.

SoA Structure of Arrays: each particle attribute stored in its own array.

Tile / rank A block of 8 × 8 × 8 cells with its own particle buffer / one MPI process.

uth Thermal momentum (in units of mec): higher means more particles change cell each step.

RDMA / UNR Remote Direct Memory Access; Unified Notifiable RMA, a one-sided library with completion notification.

BSP Bulk-synchronous parallel: everyone computes, then everyone waits at a barrier.

Topics in this iPaper

Computer science
we present POLAR-PIC, a co-designed framework for large-scale PIC simulations

Abstract, page 1

Physics
Particle-in-Cell (PIC) simulations are fundamental to plasma physics

Abstract, page 1

high performance computing
Particle-in-Cell simulation, High-Performance Computing, Scientific Computing, Hardware Acceleration

Keywords, page 1

particle in cell simulation
The Particle-in-Cell (PIC) method is fundamental to kinetic plasma physics

Section 1, page 1

matrix processing units
recent CPUs increasingly integrate Matrix Processing Units (MPUs)

Section 3.2, page 4

data locality
This design dynamically maintains a physically contiguous layout without a periodic stop-the-world global sort.

Section 4.3, page 5

remote direct memory access
UNR_Put/Get offload transfers to the NIC via RDMA with minimal CPU involvement

Section 3.4, page 4

plasma physics
Particle-in-Cell (PIC) simulations are fundamental to plasma physics

Abstract, page 1