Fortran interface layer of the framework for developing particle simulator FDPS

Fortran interface layer of the framework for developing particle simulator FDPS
复制标题

粒子模拟器FDPS开发框架的Fortran接口层

DOI:
10.1093/pasj/psy062
复制
发表时间:
2018
影响因子:
2.3
通讯作者:
Makino Junichiro
Makino Junichiro
中科院分区:
物理与天体物理4区
文献类型:
--
作者:
Namekata Daisuke ;Iwasawa Masaki ;Nitadori Keigo ;Tanikawa Ataru ;Muranushi Takayuki ;Wang Long ;Hosono Natsuki ;Nomura Kentaro ;Makino Junichiro

文献摘要

参考文献

被引文献

相似文献

基于粒子方法的数值模拟在包括天体物理在内的各个领域都有着广泛的应用。到目前为止,各个领域的研究人员或研究小组已经开发了各种版本的模拟软件,通过大量的时间和精力,即使所使用的数值算法非常相似。为了改善这种情况,我们开发了一个名为FDPS(粒子模拟器开发框架)的框架,它使研究人员能够轻松地为任意粒子方法开发大规模并行粒子模拟代码。在3.0版之前,FDPS只为C++编程语言提供了一个API(应用程序编程接口)。这个限制来自于这样一个事实,即FDPS是使用C++中的模板功能开发的,这对于支持任意数据类型的粒子是必不可少的。然而,有许多研究人员使用Fortran来开发他们的代码。因此,以前的FDPS版本要求这些人投入大量时间来学习C++。这是没有效率的。为了科普这个问题,我们在FDPS中开发了一个Fortran接口层,它为Fortran提供了API。为了支持Fortran中任意类型的粒子数据,我们设计了Fortran接口层。我们提供的Pythonscript基于Fortran中给定的表示粒子的派生数据类型,自动生成一个库来操作FDPS的C++核心部分。这个库被看作是一个Fortran模块,从Fortran端提供FDPS的API,并在内部使用C程序来实现Fortran与C++的互操作。通过这种方式,我们克服了在Fortran中模拟“模板”时的几个技术问题。使用Fortran接口,用户可以在Fortran中开发其代码的所有部分。我们表明,Fortran接口部分的开销是足够小的,在Fortran中编写的代码表现出几乎相同的性能在C++中编写的。
Numerical simulations based on particle methods have been widely used in various fields including astrophysics. To date, various versions of simulation software have been developed by individual researchers or research groups in each field, through a huge amount of time and effort, even though the numerical algorithms used are very similar. To improve the situation, we have developed a framework, called FDPS (Framework for Developing Particle Simulators), which enables researchers to develop massively parallel particle simulation codes for arbitrary particle methods easily. Until version 3.0, FDPS provided an API (application programming interface) for the C++ programming language only. 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 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, aPythonscript provided by us automatically generates a library that manipulates the C++ core part of FDPS. This library is seen as a Fortran module providing an 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 a ‘template’ in Fortran. 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++.
Tanaka,K.:“非平稳和不可逆时间序列模型的渐近推理的 Fredholm 方法”计量经济学理论。
DOI: --
发表时间: --
期刊:
影响因子: --
作者:
通讯作者: --
模拟 Chariklo 的最小环形世界
DOI: 10.3847/2041-8213/aa6256
发表时间: 2017
期刊: The Astrophysical Journal Letters
影响因子: --
作者:
S. Michikoshi;E. Kokubo
通讯作者: E. Kokubo
DOI: 10.1093/pasj/psw053
发表时间: 2016-08-01
影响因子: 2.3
作者:
Iwasawa, Masaki;Tanikawa, Ataru;Makino, Junichiro
通讯作者: Makino, Junichiro
DOI: 10.1006/icar.1995.1157
发表时间: 1995
期刊: Icarus
影响因子: 3.2
作者:
H. Salo
通讯作者: H. Salo
超大规模巨大撞击模拟的不收敛
DOI: 10.1093/pasj/psw131
发表时间: 2017
影响因子: 2.3
作者:
Hosono Natsuki;Iwasawa Masaki;Tanikawa Ataru;Nitadori Keigo;Muranushi Takayuki;Makino Junichiro
通讯作者: Makino Junichiro