Fortran interface layer of the framework for developing particle simulator FDPS
arXiv:1804.08935 · doi:10.1093/pasj/psy062
Abstract
Numerical simulations based on particle methods have been widely used in various fields including astrophysics. To date, simulation softwares have been developed by individual researchers or research groups in each field, with a huge amount of time and effort, even though numerical algorithms used are very similar. To improve the situation, we have developed a framework, called FDPS, which enables researchers to easily develop massively parallel particle simulation codes for arbitrary particle methods. Until version 3.0, FDPS have provided API only for C++ programing language. This limitation comes from the fact that FDPS is developed using the template feature in C++, which is essential to support arbitrary data types of particle. However, there are many researchers who use Fortran to develop their codes. Thus, the previous versions of FDPS require such people to invest much time to learn C++. This is inefficient. To cope with this problem, we newly developed a Fortran interface layer in FDPS, which provides API for Fortran. In order to support arbitrary data types of particle in Fortran, we design the Fortran interface layer as follows. Based on a given derived data type in Fortran representing particle, a Python script provided by us automatically generates a library that manipulates the C++ core part of FDPS. This library is seen as a Fortran module providing API of FDPS from the Fortran side and uses C programs internally to interoperate Fortran with C++. In this way, we have overcome several technical issues when emulating `template' in Fortran. By using the Fortran interface, users can develop all parts of their codes in Fortran. We show that the overhead of the Fortran interface part is sufficiently small and a code written in Fortran shows a performance practically identical to the one written in C++.
10 pages, 10 figures; accepted for publication in PASJ; a typo in author name is corrected
References in corpus (10)
- Implementation and performance of FDPS: A Framework Developing Parallel Particle Simulation Codes
- Large Scale Molecular Dynamics Simulations of Homogeneous Nucleation
- The GC Simulations : Quantifying the Dark Side of the Universe in the Planck Cosmology
- Detection of submillimeter-wave [C I] emission in gaseous debris disks of 49 Ceti and Beta Pictoris
- Does Explosive Nuclear Burning occur in Tidal Disruption Events of White Dwarfs by Intermediate Mass Black Holes ?
- Unconvergence of Very Large Scale GI Simulations
- Simulating the Smallest Ring World of Chariklo
- A comparison of SPH artificial viscosities and their impact on the Keplerian disk
- PENTACLE: Parallelized Particle-Particle Particle-Tree Code for Planet Formation
- Tidal double detonation: a new mechanism for a thermonuclear explosion of a white dwarf induced by a tidal disruption event
Cited by in corpus (20)
- Three-Dimensional Simulation of Double-Detonations in the Double-Degenerate Model for Type Ia Supernovae and Interaction of Ejecta with a Surviving White Dwarf Companion
- Imprint of anisotropic primordial non-Gaussianity on halo intrinsic alignments in simulations
- Accelerated FDPS --- Algorithms to Use Accelerators with FDPS
- A Parameter-Masked Mock Data Challenge for Beyond-Two-Point Galaxy Clustering Statistics
- The impact of primordial binary on the dynamical evolution of intermediate massive star clusters
- A tale of caution: the tails of NGC 752 are much longer than claimed
- The impact of massive stars and black holes on the fate of open star clusters and their tidal streams
- Impact of initial mass functions on the dynamical channel of gravitational wave sources
- SIRIUS project II: a new tree-direct hybrid code for smoothed particle hydrodynamics/N-body simulations of star clusters
- The Exchange of Mass and Angular Momentum in the Impact Event of Ice Giant Planets: Implications for the origin of Uranus
- Improved particle spray algorithm for modeling globular cluster streams
- Formation and evolution of binary black holes in -body simulations of star clusters with up to two million stars
- On the origin of the split main sequences of the young massive cluster NGC 1856
- Effect of Equation of State and Cutoff Density in Smoothed Particle Hydrodynamics Simulations of the Moon-Forming Giant Impact
- Frequency of the dark matter subhalo collisions and bifurcation sequence arising formation of dwarf galaxies
- Investigating the UV-excess in star clusters with -body simulations: predictions for future CSST observations
- Stellar Mass Segregation in Dark Matter Halos
- Implementation and Performance of Barnes-Hut N-body algorithm on Extreme-scale Heterogeneous Many-core Architectures
- A Mean-Field Approach to Simulating the Merging of Collisionless Stellar Systems Using a Particle-Based Method
- SCF-FDPS: A Fast -body Code for Simulating Disk-halo Systems