Vectorization and Parallelization of the Adaptive Mesh Refinement N-body Code
arXiv:astro-ph/0507339 · doi:10.1093/pasj/57.5.779
Abstract
In this paper, we describe our vectorized and parallelized adaptive mesh refinement (AMR) N-body code with shared time steps, and report its performance on a Fujitsu VPP5000 vector-parallel supercomputer. Our AMR N-body code puts hierarchical meshes recursively where higher resolution is required and the time step of all particles are the same. The parts which are the most difficult to vectorize are loops that access the mesh data and particle data. We vectorized such parts by changing the loop structure, so that the innermost loop steps through the cells instead of the particles in each cell, in other words, by changing the loop order from the depth-first order to the breadth-first order. Mass assignment is also vectorizable using this loop order exchange and splitting the loop into loops, if the cloud-in-cell scheme is adopted. Here, is the number of dimension. These vectorization schemes which eliminate the unvectorized loops are applicable to parallelization of loops for shared-memory multiprocessors. We also parallelized our code for distributed memory machines. The important part of parallelization is data decomposition. We sorted the hierarchical mesh data by the Morton order, or the recursive N-shaped order, level by level and split and allocated the mesh data to the processors. Particles are allocated to the processor to which the finest refined cells including the particles are also assigned. Our timing analysis using the -dominated cold dark matter simulations shows that our parallel code speeds up almost ideally up to 32 processors, the largest number of processors in our test.
arXiv comment21pages, 16 figures, to be published in PASJ (Vol. 57, No. 5, Oct. 2005)
References in corpus (21)
- Cosmological Hydrodynamics with Adaptive Mesh Refinement: a new high resolution code called RAMSES
- GADGET: A code for collisionless and gasdynamical cosmological simulations
- Adaptive Refinement Tree - a new high-resolution N-body code for cosmological simulations
- Cosmic Background Anisotropies in CDM Cosmology
- Multiscale Gaussian Random Fields for Cosmological Simulations
- Galaxy Clusters in Hubble Volume Simulations: Cosmological Constraints from Sky Survey Populations
- Fully Threaded Tree for Adaptive Refinement Fluid Dynamics Simulations
- GRAPE-6: The massively-parallel special-purpose computer for astrophysical particle simulation
- A Parallel Tree Code
- MLAPM - a C code for cosmological simulations
- A New Parallel N-body Gravity Solver: TPM
- GRAPE-5: A Special-Purpose Computer for N-body Simulation
- Tree-Particle-Mesh: an adaptive, efficient, and parallel code for collisionless cosmological simulation
- Cosmological Adaptive Mesh Refinement
- Mass Function of Low Mass Dark Halos
- A New Parallel P3M Code for Very Large-Scale Cosmological Simulations
- Particle-Mesh Methods on the Connection Machine
- N-Body Code with Adaptive Mesh Refinement
- An Adaptive Multigrid Solver for High-Resolution Cosmological Simulations
- An adaptive hierarchical particle-mesh code with isolated boundary conditions
- The Forest Method as a New Parallel Tree Method with the Sectional Voronoi Tessellation
Cited by in corpus (12)
- The Sizes of Early-type Galaxies
- The origin of globular cluster systems from cosmological simulations
- On the Color Magnitude Relation of Early-type Galaxies
- Numerical Galaxy Catalog -I. A Semi-analytic Model of Galaxy Formation with N-body simulations
- On spatial distributions of old globular clusters in clusters of galaxies
- Formation of intracluster globular clusters
- The radial alignment of dark matter subhalos: from simulations to observations
- Gravitational Microlensing: A parallel, large-data implementation
- On the Origin of Mass--Metallicity Relations, Blue Tilts, and Scaling Relations for Metal-poor Globular Cluster Systems
- The U-shaped distribution of globular cluster specific frequencies in a biased globular cluster formation scenario
- Formation of the Galactic globular clusters with He-rich stars in low-mass halos virialized at high redshift
- Dark energy constraints and correlations with systematics from CFHTLS weak lensing, SNLS supernovae Ia and WMAP5