Fortran interface layer of the framework for developing particle simulator FDPS

Autor: Long Wang, Daisuke Namekata, Natsuki Hosono, Junichiro Makino, Ataru Tanikawa, Kentaro Nomura, Takayuki Muranushi, Masaki Iwasawa, Keigo Nitadori
Jazyk: angličtina
Rok vydání: 2018
Předmět:
FOS: Computer and information sciences
Fortran
Interface (Java)
Interoperability
Overhead (engineering)
FOS: Physical sciences
02 engineering and technology
computer.software_genre
01 natural sciences
Data type
Field (computer science)
methods: numerical
Computational Engineering
Finance
and Science (cs.CE)

0103 physical sciences
0202 electrical engineering
electronic engineering
information engineering

planets and satellites: formation
Computer Science - Computational Engineering
Finance
and Science

Instrumentation and Methods for Astrophysics (astro-ph.IM)
010303 astronomy & astrophysics
Massively parallel
computer.programming_language
Earth and Planetary Astrophysics (astro-ph.EP)
Physics
020203 distributed computing
Programming language
Astronomy and Astrophysics
Computational Physics (physics.comp-ph)
Python (programming language)
(cosmology:) dark matter
Space and Planetary Science
Astrophysics - Instrumentation and Methods for Astrophysics
galaxies: evolution
Physics - Computational Physics
computer
Astrophysics - Earth and Planetary Astrophysics
Zdroj: Publications of the Astronomical Society of Japan. 70(4):70-70
ISSN: 0004-6264
Popis: 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++.
Comment: 10 pages, 10 figures; accepted for publication in PASJ; a typo in author name is corrected
Databáze: OpenAIRE