...
首页> 外文期刊>PASJ: Publications of the Astronomical Society of Japan >Fortran interface layer of the framework for developing particle simulator FDPS
【24h】

Fortran interface layer of the framework for developing particle simulator FDPS

机译:用于开发粒子模拟器FDPS的框架的Fortran接口层

获取原文
   

获取外文期刊封面封底 >>

       

摘要

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, 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 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++.
机译:基于粒子方法的数值模拟已广泛应用于包括天体物理学在内的各个领域。迄今为止,尽管使用的数值算法非常相似,但各个领域的个人研究人员或研究小组已经通过大量的时间和精力开发了各种版本的仿真软件。为了改善这种情况,我们开发了一个名为FDPS(用于开发粒子模拟器的框架)的框架,该框架使研究人员可以轻松地为任意粒子方法开发大规模并行的粒子模拟代码。在3.0版之前,FDPS仅提供用于C ++编程语言的API(应用程序编程接口)。此限制来自以下事实:FDPS是使用C ++中的模板功能开发的,这对于支持粒子的任意数据类型至关重要。但是,有许多研究人员使用Fortran来开发代码。因此,FDPS的早期版本要求此类人员花费大量时间来学习C ++。这是低效的。为了解决这个问题,我们在FDPS中开发了一个Fortran接口层,该接口层提供了Fortran的API。为了在Fortran中支持粒子的任意数据类型,我们如下设计Fortran接口层。基于Fortran中表示粒子的给定派生数据类型,我们提供的Python脚本会自动生成一个库,用于处理FDPS的C ++核心部分。该库被视为一个Fortran模块,从Fortran端提供FDPS的API,并在内部使用C程序使Fortran与C ++互操作。这样,我们在模拟Fortran中的“模板”时就克服了一些技术问题。使用Fortran界面,用户可以在Fortran中开发其代码的所有部分。我们证明了Fortran接口部分的开销足够小,用Fortran编写的代码显示的性能实际上与用C ++编写的代码相同。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号