← Back
Home › Systems › Simulation and scientific computing

n-body

gravitational n-body simulation

GADGET

SystemTechniques · 8Primitives · 25 n-body Halo exchangedistributed · medium: Each rank stores its block plus a border copy of its neighbours' edge cells, refreshed by small messages every step; communication scales with block surface, not volume.›Checkpoint and restarthardware-os · medium: Periodically save enough state to resume a computation after a crash, preemption or move, with an interval that balances save cost against lost work.›Barnes hut treephysics · medium: Octree with center-of-mass nodes; opening-angle criterion gives O(n log n) gravity forcesFast multipole methodphysics · medium: O(n) far-field interactions via multipole and local expansions on a hierarchical treeHierarchical timesteppingphysics · medium: Block power-of-two timesteps per particle for multi-scale dynamicsParticle mesh ewaldphysics · medium: Split long-range forces: real-space short range plus FFT mesh solve (PME, PPPM, TreePM)Smoothed particle hydrodynamicsphysics · medium: SPH kernels for density, pressure and viscosity on particles; neighbor searchQuadtree octreegeometry · low: Adaptive spatial subdivision trees for queries and level of detail; loose and linear variantsSpace filling curvesgeometry · low: Z-order/Morton (geohash) and Hilbert curves mapping multi-dimensional points to sortable keysVerlet / leapfrognumerics · low: Half-kick, drift, half-kick: a second-order, time-reversible, symplectic integrator with one force evaluation per step whose energy error stays bounded for millions of steps.›Fast Fourier transformnumerics · low: Computes the DFT in O(n log n) by recursively splitting into even and odd halves; the basis of fast convolution and spectral methods.›Union-findgraphs · low: Disjoint-set forest with union by size and path compression; merges sets and answers same-set queries in effectively constant time.›SIMD programminghardware-os · low: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›Collective communicationml-training · low: The family of group exchanges (broadcast, reduce, all-gather, reduce-scatter, all-to-all) and the latency-plus-bytes cost model that picks ring, tree or direct algorithms by message size and topology.›Eager rendezvous protocoldistributed · low: MPI point-to-point: eager sends for small messages, rendezvous handshake for large onesRdmanetworking · low: RDMA verbs over InfiniBand/RoCE: queue pairs, memory registration, one-sided opsZero-copy I/Onetworking · low: Move bytes between files, sockets and NICs by passing page references instead of copying through user space: sendfile, splice, MSG_ZEROCOPY, kTLS.›Copy-on-write forkhardware-os · low: fork() gives the child the parent's whole address space by sharing pages read-only and copying one only when someone writes it; vfork and posix_spawn skip even that.›Dirty page trackinghardware-os · low: Write-protection or PML logs of modified guest/process pagesmmap and the page cachehardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.›Ptrace process controlhardware-os · low: Ptrace: attach, read and write registers and memory, single-step, intercept signalsd-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Neighbor listsphysics · low: Cell lists plus Verlet buffer lists for O(n) short-range pair interactions+ 1 more techniques+ 9 more primitives

Similar systems

Share the most building blocks with this one.