Cross-language Babel structs—making scientific interfaces more efficient

A. Prantl, D. Ebner, T. Epperly
{"title":"Cross-language Babel structs—making scientific interfaces more efficient","authors":"A. Prantl, D. Ebner, T. Epperly","doi":"10.1088/1749-4699/6/1/014004","DOIUrl":null,"url":null,"abstract":"Babel is an open-source language interoperability framework tailored to the needs of high-performance scientific computing. As an integral element of the Common Component Architecture, it is employed in a wide range of scientific applications where it is used to connect components written in different programming languages. In this paper we describe how we extended Babel to support interoperable tuple data types (structs). Structs are a common idiom in (mono-lingual) scientific application programming interfaces (APIs); they are an efficient way to pass tuples of nonuniform data between functions, and are supported natively by most programming languages. Using our extended version of Babel, developers of scientific codes can now pass structs as arguments between functions implemented in any of the supported languages. In C, C++, Fortran 2003/2008 and Chapel, structs can be passed without the overhead of data marshaling or copying, providing language interoperability at minimal cost. Other supported languages are Fortran 77, Fortran 90/95, Java and Python. We will show how we designed a struct implementation that is interoperable with all of the supported languages and present benchmark data to compare the performance of all language bindings, highlighting the differences between languages that offer native struct support and an object-oriented interface with getter/setter methods. A case study shows how structs can help simplify the interfaces of scientific codes significantly.","PeriodicalId":89345,"journal":{"name":"Computational science & discovery","volume":"6 1","pages":"014004"},"PeriodicalIF":0.0000,"publicationDate":"2013-05-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1088/1749-4699/6/1/014004","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computational science & discovery","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1088/1749-4699/6/1/014004","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Babel is an open-source language interoperability framework tailored to the needs of high-performance scientific computing. As an integral element of the Common Component Architecture, it is employed in a wide range of scientific applications where it is used to connect components written in different programming languages. In this paper we describe how we extended Babel to support interoperable tuple data types (structs). Structs are a common idiom in (mono-lingual) scientific application programming interfaces (APIs); they are an efficient way to pass tuples of nonuniform data between functions, and are supported natively by most programming languages. Using our extended version of Babel, developers of scientific codes can now pass structs as arguments between functions implemented in any of the supported languages. In C, C++, Fortran 2003/2008 and Chapel, structs can be passed without the overhead of data marshaling or copying, providing language interoperability at minimal cost. Other supported languages are Fortran 77, Fortran 90/95, Java and Python. We will show how we designed a struct implementation that is interoperable with all of the supported languages and present benchmark data to compare the performance of all language bindings, highlighting the differences between languages that offer native struct support and an object-oriented interface with getter/setter methods. A case study shows how structs can help simplify the interfaces of scientific codes significantly.
跨语言Babel结构-使科学接口更有效
Babel是一个为高性能科学计算需求量身定制的开源语言互操作性框架。作为公共组件体系结构的一个组成部分,它被广泛应用于科学应用程序中,用于连接用不同编程语言编写的组件。在本文中,我们描述了如何扩展Babel以支持可互操作的元组数据类型(结构体)。结构是(单语言)科学应用程序编程接口(api)中的常用习语;它们是在函数之间传递非统一数据元组的有效方法,大多数编程语言都支持它们。使用我们的扩展版Babel,科学代码的开发人员现在可以在任何支持的语言实现的函数之间传递结构体作为参数。在C、c++、Fortran 2003/2008和Chapel中,结构体可以在没有数据封送或复制开销的情况下传递,以最小的成本提供语言互操作性。其他支持的语言有Fortran 77、Fortran 90/95、Java和Python。我们将展示如何设计一个与所有支持的语言可互操作的结构体实现,并提供基准数据来比较所有语言绑定的性能,突出显示提供本机结构体支持的语言与具有getter/setter方法的面向对象接口的语言之间的差异。一个案例研究展示了结构体如何帮助显著简化科学代码的接口。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信