arXiv Science⌕ Search

arXiv · astro-ph/0507339

Vectorization and Parallelization of the Adaptive Mesh Refinement N-body Code

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 $2^{N_{dim}}$ loops, if the cloud-in-cell scheme is adopted. Here, $N_{dim}$ 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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Hideki Yahagi. 2005-07-14. Vectorization and Parallelization of the Adaptive Mesh Refinement N-body Code. https://doi.org/10.1093/pasj%2F57.5.779

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Frame covariance of CMBR lensing in the exact 1+3 covariant radiation hierarchy

The exact $1+3$ covariant Boltzmann hierarchy for the cosmic microwave background contains acceleration, shear and vorticity couplings whose coefficients grow linearly in $\ell$. We show that all are the multipole form of the aberration operator in the photon Liouville equation. Under a change of threading, this operator shifts by the along-ray generator of a Lorentz boost. The acceleration coupling of $\ell$ to $\ell\pm1$ and the shear coupling of $\ell$ to $\ell\pm2$ are therefore frame-covariant descriptions of the same operator, related by an algebraic, pointwise relabelling of direction. With emitter and observer frames fixed, the observed sky is independent of the intermediate threading at every $\ell$. We derive this in $1+3$ covariant and gauge-invariant variables without constructing second-order gauge-invariant variables. The $O(ε^2\ell)$ content is gravitational lensing, as known in metric variables. Linearisation about a Friedmann--Lemaître--Robertson--Walker background removes these couplings, requiring lensing to be reinstated from the geodesic equation. Keeping the threading arbitrary makes frame covariance explicit and places observer aberration in the same operator. In the Newtonian threading we compute both halves of the deflection: the equivalence-principle contribution enters through aberration, while the spatial-curvature contribution arises from free streaming on perturbed spatial sections and reduces to the same operator. The lensing efficiency follows from the direction derivative. The angular-power-spectrum contribution is quartic in the potential: for a deflection statistically independent of the source, the two fourth-order terms carrying $\ell^2$ cancel where the spectrum is smooth on the deflection scale, and lensing redistributes power without adding ensemble variance.

astro-ph↗

Cosmic Conundrums with Quantum Corrections

Darh energy was discovered over 25 years ago and we do not have an explanation of it. Dark matter comprises 95% of matter in the universe and we still don't know what it is. The Webb telescope has been finding fully formed galaxies with massive black holes millions of times the mass of the sun in the early universe and we don't have any explanation. A quantum density limitation will be used to solve these and other outstanding problems.

astro-ph↗

On binary pulsars and the force of gravity

The energy-momentum budget of the astrophysical systems can be studied by the exact local conservation equation derived by Landau and Lifshitz. We show that a similar equation is valid for the Einstein-Cartan gravity. We reanalyze a binary pulsar system using the Landau-Lifshitz conservation equation and show that the orbital period change rate can be completely understood as a curvature backreaction process. Taking into account the detailed theoretical and observational research of relativistic binary pulsar systems, especially the system of Hulse and Taylor, we conclude that general relativity and astrophysical observations rule out the existence of gravitational radiation. We comment upon the LIGO GW events and their alternative explanation, as well as the recent pulsar timing arrays data.

astro-ph↗