Skip to main content
QUICK REVIEW

[Paper Review] Latfield2: A c++ library for classical lattice field theory

David Daverio, Mark Hindmarsh|arXiv (Cornell University)|Aug 23, 2015
Distributed and Parallel Computing SystemsComputer Science16 citations
TL;DR

Latfield2 is a C++ library for scalable, portable parallel simulations of classical field theories on Cartesian grids, using rod-based domain decomposition with MPI and a native 3D FFT. It enables efficient large-scale simulations—up to 4096³ lattices across 32,000 cores—with integrated I/O server and high-performance FFT, achieving near-ideal scalability and 8.8 GB/s I/O bandwidth on large systems.

ABSTRACT

latfield2 is a C++ library designed to simplify writing parallel codes for solving partial differen- tial equations, developed for application to classical field theories in particle physics and cosmology. It is a significant rewrite of the latfield framework, moving from a slab domain decomposition to a rod decomposition, where the last two dimension of the lattice are scattered into a two dimensional process grid. Parallelism is implemented using the Message Passing Interface (MPI) standard, and hidden in the basic objects of grid-based simulations: Lattice, Site and Field. It comes with an integrated parallel fast Fourier transform, and I/O server class permitting computation to continue during the writing of large files to disk. latfield2 has been used for production runs on tens of thousands of processor elements, and is expected to be scalable to hundreds of thousands.

Motivation & Objective

  • To address the scalability limitations of slab-based domain decomposition in large-scale lattice field simulations.
  • To enable efficient, portable, and highly scalable simulations on distributed-memory systems using rod-based decomposition.
  • To integrate a high-performance, parallel 3D Fast Fourier Transform (FFT) within the same computational framework.
  • To decouple I/O from computation using a dedicated I/O server, minimizing performance bottlenecks during large file writes.
  • To provide a lightweight, easy-to-use framework for rapid development of scalable, production-grade simulations in particle physics and cosmology.

Proposed method

  • Adopting rod-based domain decomposition, where two spatial dimensions are distributed across a 2D process grid, enabling finer load balancing and better scalability than slab decomposition.
  • Implementing MPI-based parallelism hidden within core abstractions: Lattice, Site, and Field, abstracting low-level communication.
  • Integrating a portable, parallel 3D FFT with rod decomposition, allowing efficient spectral analysis on large grids.
  • Introducing an I/O server class that offloads file writing to separate processes, enabling computation to proceed concurrently with I/O.
  • Designing the library for simplicity and rapid prototyping, focusing on static grids without features like adaptive mesh refinement or built-in solvers.
  • Using a modular design with examples and detailed documentation to lower the barrier to entry for non-experts in parallel computing.

Experimental results

Research questions

  • RQ1Can rod-based domain decomposition improve scalability and memory efficiency in large-scale lattice field simulations compared to slab decomposition?
  • RQ2How does the performance of a parallel 3D FFT with rod decomposition scale across tens of thousands of cores?
  • RQ3To what extent can an integrated I/O server maintain high computational throughput during large-scale data writes?
  • RQ4How does the library’s performance vary with lattice size and number of components in field operations?
  • RQ5Can a lightweight, high-performance C++ library achieve production-level performance on modern supercomputers without heavy-weight frameworks?

Key findings

  • Latfield2 achieves near-ideal scalability for 3D FFT operations, maintaining efficiency close to 1.0 up to 4096 processes on 512³ lattices, with performance dropping only beyond 16,384 processes for larger lattices.
  • The I/O server enables sustained bandwidth of up to 8.8 GB/s on the Monte Rosa cluster, approaching the theoretical peak of 10 GB/s, with minimal impact on computation.
  • Field operations such as first-order spatial derivatives show improved efficiency with increasing process count due to better data locality, approaching 1.0 efficiency at scale.
  • The update halo procedure, while not scaling well due to fixed halo size, remains negligible in wall-clock time compared to local computation in practice.
  • The library has been successfully used in production for over 3 years at CSCS, scaling to more than 34,000 cores for simulations of cosmic strings in the Abelian Higgs model.
  • Benchmarking confirms that the 3D FFT wrapper scales well across 4096 processes for 512³ lattices, with only slight performance degradation as the number of field components increases.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.