首页 > 最新文献

ACM SIGPLAN Fortran Forum最新文献

英文 中文
Compiler support for the Fortran 2003 standard 编译器支持Fortran 2003标准
Pub Date : 2007-04-01 DOI: 10.1145/1243413.1243414
I. Chivers, J. Sleightholme
This is a standing article in Fortran Forum. The first version appeared in Fortran Forum Volume 26, Number 1, April 2007. The basis for the entries in the list of features was a report by John Reid The original report can be found at: ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf An updated version of this report was included in Fortran Forum. An electronic version can be found at: ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1648.pdf If you are a compiler vendor and would like to be included in future versions of this table please email one of us with details and they will be added to the table and published in Fortran Forum.
这是Fortran论坛的常备文章。第一个版本出现在2007年4月的Fortran论坛第26卷第1期。特性列表中条目的基础是John Reid的一份报告,原始报告可以在ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf上找到,该报告的更新版本包含在Fortran论坛中。如果您是编译器供应商,并希望包含在此表的未来版本中,请通过电子邮件将详细信息发送给我们中的一位,它们将被添加到表中并发布在Fortran论坛上。
{"title":"Compiler support for the Fortran 2003 standard","authors":"I. Chivers, J. Sleightholme","doi":"10.1145/1243413.1243414","DOIUrl":"https://doi.org/10.1145/1243413.1243414","url":null,"abstract":"This is a standing article in Fortran Forum. The first version appeared in Fortran Forum Volume 26, Number 1, April 2007. The basis for the entries in the list of features was a report by John Reid The original report can be found at: ftp://ftp.nag.co.uk/sc22wg5/N1551-N1600/N1579.pdf An updated version of this report was included in Fortran Forum. An electronic version can be found at: ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1648.pdf If you are a compiler vendor and would like to be included in future versions of this table please email one of us with details and they will be added to the table and published in Fortran Forum.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"121 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132894559","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
Correction on "Dynamic Polymorphism in Fortran 95" from August 2006 issue 对2006年8月号“Fortran 95中的动态多态性”的更正
Pub Date : 2007-04-01 DOI: 10.1145/1243413.1243416
Reinhold Bader
This authors' August 2006 article contained a discussion on the use of submodules to improve encapsulation for a dynamic polymorphism emulation which is incorrect.
本文作者在2006年8月发表的文章中讨论了使用子模块来改进动态多态性仿真的封装,这是不正确的。
{"title":"Correction on \"Dynamic Polymorphism in Fortran 95\" from August 2006 issue","authors":"Reinhold Bader","doi":"10.1145/1243413.1243416","DOIUrl":"https://doi.org/10.1145/1243413.1243416","url":null,"abstract":"This authors' August 2006 article contained a discussion on the use of submodules to improve encapsulation for a dynamic polymorphism emulation which is incorrect.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"43 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2007-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132024477","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Fortran resources: compilers Fortran资源:编译器
Pub Date : 2006-12-01 DOI: 10.1145/1189022.1189025
I. Chivers, J. Sleightholme
The following is a list of companies and organisations that provide Fortran compilers that conform to the Fortran 90 or 95 standard. Some of these compilers also implement one or more features of the Fortran 2003 standard.
以下是提供符合Fortran 90或95标准的Fortran编译器的公司和组织的列表。其中一些编译器还实现了Fortran 2003标准的一个或多个特性。
{"title":"Fortran resources: compilers","authors":"I. Chivers, J. Sleightholme","doi":"10.1145/1189022.1189025","DOIUrl":"https://doi.org/10.1145/1189022.1189025","url":null,"abstract":"The following is a list of companies and organisations that provide Fortran compilers that conform to the Fortran 90 or 95 standard. Some of these compilers also implement one or more features of the Fortran 2003 standard.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"91 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117345370","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Archaic to modern 2: kinds and modules 从古代到现代2:种类和模块
Pub Date : 2006-12-01 DOI: 10.1145/1189022.1189023
D. Nagle
This is the second in a series of articles about converting archaic (66, 77) Fortran to modern (90, 95, 2003) Fortran. In the first, I discussed revision control (rcs), compilation control (make), and checking procedure interfaces and common blocks. The idea is to give an older, Fortran 77 (or earlier) code a check-up before trying to modify it. I also discussed automatic conversion of older Fixed Format source files to the modern Free Format. Free Format is easier to use, and can eliminate some problems present when using Fixed Format, mainly associated with searching for names. In this article, I'll discuss the Fortran kind mechanism for selecting types and the Fortran module for sharing data among procedures. Next, I'll try to tie the notions of agreement in type, kind, and rank, the use of procedure interfaces and common block consistency issues together with the use of modules.
这是关于将古老的(66,77)Fortran转换为现代的(90,95,2003)Fortran的系列文章中的第二篇。在第一篇文章中,我讨论了修订控制(rcs)、编译控制(make)以及检查过程接口和公共块。其思想是在试图修改旧的Fortran 77(或更早的)代码之前对其进行检查。我还讨论了旧的固定格式源文件到现代自由格式的自动转换。自由格式更容易使用,并且可以消除使用固定格式时出现的一些问题,主要与搜索名称有关。在本文中,我将讨论用于选择类型的Fortran类机制和用于在过程之间共享数据的Fortran模块。接下来,我将尝试将类型、种类和等级中的协议概念、过程接口的使用和公共块一致性问题与模块的使用联系起来。
{"title":"Archaic to modern 2: kinds and modules","authors":"D. Nagle","doi":"10.1145/1189022.1189023","DOIUrl":"https://doi.org/10.1145/1189022.1189023","url":null,"abstract":"This is the second in a series of articles about converting archaic (66, 77) Fortran to modern (90, 95, 2003) Fortran. In the first, I discussed revision control (rcs), compilation control (make), and checking procedure interfaces and common blocks. The idea is to give an older, Fortran 77 (or earlier) code a check-up before trying to modify it. I also discussed automatic conversion of older Fixed Format source files to the modern Free Format. Free Format is easier to use, and can eliminate some problems present when using Fixed Format, mainly associated with searching for names. In this article, I'll discuss the Fortran kind mechanism for selecting types and the Fortran module for sharing data among procedures. Next, I'll try to tie the notions of agreement in type, kind, and rank, the use of procedure interfaces and common block consistency issues together with the use of modules.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"2017 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127550780","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Compiler switches for developing Fortran programs 用于开发Fortran程序的编译器开关
Pub Date : 2006-12-01 DOI: 10.1145/1189022.1189024
I. Chivers, J. Sleightholme
There was a thread on one of the news lists about debugging Fortran programs and the major source of information on the web is the Polyhedron site where they look at the diagnostic capability of a range of compilers under Windows and Linux. The following has been put together from some guidelines that we have developed from teaching Fortran within the University of London (Imperial College, Chelsea College, Queen Elizabeth College and King's College, from 1978 to the present) and the information at the Polyhedron site.
在一个关于调试Fortran程序的新闻列表上有一个帖子,网上的主要信息来源是Polyhedron网站,他们在那里查看Windows和Linux下一系列编译器的诊断能力。以下是我们从伦敦大学(帝国学院、切尔西学院、伊丽莎白女王学院和国王学院,从1978年至今)的Fortran教学中总结出来的一些指导方针,以及多面体网站上的信息。
{"title":"Compiler switches for developing Fortran programs","authors":"I. Chivers, J. Sleightholme","doi":"10.1145/1189022.1189024","DOIUrl":"https://doi.org/10.1145/1189022.1189024","url":null,"abstract":"There was a thread on one of the news lists about debugging Fortran programs and the major source of information on the web is the Polyhedron site where they look at the diagnostic capability of a range of compilers under Windows and Linux. The following has been put together from some guidelines that we have developed from teaching Fortran within the University of London (Imperial College, Chelsea College, Queen Elizabeth College and King's College, from 1978 to the present) and the information at the Polyhedron site.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130561819","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Dynamic polymorphism in Fortran 95: how submodules can help Fortran 95中的动态多态性:子模块如何提供帮助
Pub Date : 2006-08-01 DOI: 10.1145/1148105.1148106
Reinhold Bader
This article discusses the implementation of generic list or tree structures in Fortran 95 via emulation of dynamic polymorphism. The method allows the unified handling of multiple kinds of information structures [1] using a single intermediate module. It is shown that a well-designed implementation additionally requires the use of the submodule feature as described in the Technical Report ISO/IEC 19767.
本文讨论了在Fortran 95中通过模拟动态多态性实现泛型列表或树结构。该方法允许使用单个中间模块统一处理多种信息结构[1]。结果表明,设计良好的实现还需要使用技术报告ISO/IEC 19767中描述的子模块特性。
{"title":"Dynamic polymorphism in Fortran 95: how submodules can help","authors":"Reinhold Bader","doi":"10.1145/1148105.1148106","DOIUrl":"https://doi.org/10.1145/1148105.1148106","url":null,"abstract":"This article discusses the implementation of generic list or tree structures in Fortran 95 via emulation of dynamic polymorphism. The method allows the unified handling of multiple kinds of information structures [1] using a single intermediate module. It is shown that a well-designed implementation additionally requires the use of the submodule feature as described in the Technical Report ISO/IEC 19767.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"12 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117186341","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Comments on the Arjen Markus article: Design patterns and Fortran 对Arjen Markus文章的评论:设计模式和Fortran
Pub Date : 2006-08-01 DOI: 10.1145/1148105.1148107
H. Gardner, V. Decyk
The article by Markus [1] discusses the subject of object-oriented (OO) design patterns and describes ways in which three well-known patterns might be implemented in Fortran 90/95. It appears that the idea of object-oriented design patterns in Fortran might just be coming of age and it is a very appropriate subject for discussion in a Forum such as this.We have been developing our own implementations of design patterns in Fortran 90/95 for some time and have one paper under review [2] and another being presented at the 6th Workshop on Parallel/High-Performance Object Oriented Scientific Computing (POOSC) in Nantes, France in July 2006 [3]. Our application area is particle-in-cell simulations in plasma physics, but the results that we have obtained will, we hope, be of interest to Fortran 90/95 programmers in general.Our own starting point with design patterns in Fortran 90/95 stems from the literature on object-based programming in that language [4-10]. Several authors have observed that the obvious unit of encapsulation, the Fortran 90/95 module, can be thought of as an object-based class: it can support a type which defines the stored data together with subprograms which can operate on that data. With some discipline and ingenuity, these authors have shown how to emulate the notions of object construction and destruction, inheritance and polymorphism. These emulations were actually implemented using object composition. For example, one child module might include another parent module in order to simulate inheritance. As Markus correctly points out, most of the famous design patterns are based on object composition and the authors of [4-10] have, frequently, been using design patterns as a way of simulating OO behaviour.Because the subject of OO design patterns in Fortran 90/95 is so fresh, there is ample scope for them to be presented in different ways by different authors. Whilst appreciating the clarity and relevance of Markus' expositions, we would like to make some points of criticism which we believe are important to a further discussion of this topic. The points we make refer to the ideas expressed in the book by Gamma et al. [11] which is considered to be the fundamental exposition of the topic of OO design patterns.
Markus的文章[1]讨论了面向对象(OO)设计模式的主题,并描述了在Fortran 90/95中实现三种知名模式的方法。在Fortran中,面向对象设计模式的思想似乎正在走向成熟,这是一个非常适合在这样一个论坛上讨论的主题。一段时间以来,我们一直在用Fortran 90/95开发自己的设计模式实现,有一篇论文正在审查中[2],另一篇论文将于2006年7月在法国南特举行的第六届并行/高性能面向对象科学计算(pooc)研讨会上发表[3]。我们的应用领域是等离子体物理中的细胞内粒子模拟,但是我们希望我们得到的结果能够引起Fortran 90/95程序员的兴趣。我们在Fortran 90/95中设计模式的出发点源于该语言中基于对象的编程文献[4-10]。一些作者已经注意到,封装的明显单元,即Fortran 90/95模块,可以被认为是一个基于对象的类:它可以支持定义存储数据的类型,以及可以对该数据进行操作的子程序。这些作者通过一些原则和独创性,展示了如何模拟对象构造和销毁、继承和多态性的概念。这些模拟实际上是使用对象组合实现的。例如,为了模拟继承,一个子模块可能包含另一个父模块。正如Markus正确指出的那样,大多数著名的设计模式都是基于对象组合的,[4-10]的作者经常使用设计模式作为模拟OO行为的一种方式。由于Fortran 90/95中面向对象设计模式的主题是如此的新鲜,因此有足够的空间让不同的作者以不同的方式来呈现它们。在欣赏Markus阐述的清晰性和相关性的同时,我们也想提出一些我们认为对进一步讨论这一主题很重要的批评意见。我们提出的观点参考了Gamma等人[11]在书中表达的思想,这本书被认为是对OO设计模式主题的基本阐述。
{"title":"Comments on the Arjen Markus article: Design patterns and Fortran","authors":"H. Gardner, V. Decyk","doi":"10.1145/1148105.1148107","DOIUrl":"https://doi.org/10.1145/1148105.1148107","url":null,"abstract":"The article by Markus [1] discusses the subject of object-oriented (OO) design patterns and describes ways in which three well-known patterns might be implemented in Fortran 90/95. It appears that the idea of object-oriented design patterns in Fortran might just be coming of age and it is a very appropriate subject for discussion in a Forum such as this.We have been developing our own implementations of design patterns in Fortran 90/95 for some time and have one paper under review [2] and another being presented at the 6th Workshop on Parallel/High-Performance Object Oriented Scientific Computing (POOSC) in Nantes, France in July 2006 [3]. Our application area is particle-in-cell simulations in plasma physics, but the results that we have obtained will, we hope, be of interest to Fortran 90/95 programmers in general.Our own starting point with design patterns in Fortran 90/95 stems from the literature on object-based programming in that language [4-10]. Several authors have observed that the obvious unit of encapsulation, the Fortran 90/95 module, can be thought of as an object-based class: it can support a type which defines the stored data together with subprograms which can operate on that data. With some discipline and ingenuity, these authors have shown how to emulate the notions of object construction and destruction, inheritance and polymorphism. These emulations were actually implemented using object composition. For example, one child module might include another parent module in order to simulate inheritance. As Markus correctly points out, most of the famous design patterns are based on object composition and the authors of [4-10] have, frequently, been using design patterns as a way of simulating OO behaviour.Because the subject of OO design patterns in Fortran 90/95 is so fresh, there is ample scope for them to be presented in different ways by different authors. Whilst appreciating the clarity and relevance of Markus' expositions, we would like to make some points of criticism which we believe are important to a further discussion of this topic. The points we make refer to the ideas expressed in the book by Gamma et al. [11] which is considered to be the fundamental exposition of the topic of OO design patterns.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"50 2","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134543911","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 5
The major features of the next revision of Fortran 下一版Fortran的主要特性
Pub Date : 2006-08-01 DOI: 10.1145/1148105.1148108
J. Reid
Two important meetings for the next revision of Fortran were held recently. WG5 met jointly with J3 in Fairfax, Virginia, Feb. 13-17 and J3 met in Las Vegas, May 8-12.The framework was decided at last years' WG5 meeting and was not substantially changed at this year's WG5 meeting. Two large items (bits and intelligent macros) were left as do if time, which made the May J3 meeting important, since the schedule that we have adopted (aiming for the revision to be Fortran 2008) demanded that edits against Fortran 2003 for all the new features be completed at that meeting.In the event both were deemed to be ready, but interoperability of pointers, allocatables, assumed-shape arrays, and optional arguments was not ready and will be deferred to a Technical Report.There was a discussion at the J3 meeting over moving co-arrays to a Technical Report or another part of the standard, despite the WG5 decision at the February meeting that it be a first priority item. However, the major vendors reported pressure from users to provide co-arrays and it was decided (straw vote 6-3-2) to keep them. A significant argument was that it would be unsatisfactory to renege on the decision of last year that co-arrays would be there.This seems a good moment to give a quick summary of the new features. For further details, see the WG5 repositoryftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1649.txtand the J3 Work Planhttp://j3-fortran.org/doc/meeting/176/06-010r2.pdfEach of the items in the Repository has been given an estimated severity level, as defined in N1594. I will devote separate sections to the three large items (above level 5) and list those with severity level 4 or 5.
最近举行了两次关于Fortran下一次修订的重要会议。WG5与J3于2月13日至17日在弗吉尼亚州费尔法克斯举行联合会议,J3于5月8日至12日在拉斯维加斯举行联合会议。该框架是在去年的第五届世界工作组会议上决定的,在今年的第五届世界工作组会议上没有进行实质性修改。随着时间的推移,两个重要的项目(比特和智能宏)被保留了下来,这使得5月3日的会议变得很重要,因为我们采用的时间表(目标是Fortran 2008的修订)要求在会议上完成针对Fortran 2003的所有新特性的编辑。在这种情况下,两者都被认为已经准备好了,但是指针、可分配对象、假定形状数组和可选参数的互操作性还没有准备好,将推迟到技术报告中讨论。尽管WG5在2月的会议上决定将其作为第一优先事项,但在J3会议上有关于将共阵移动到技术报告或标准的其他部分的讨论。然而,主要供应商报告了来自用户的压力,要求提供联合阵列,最终决定(投票结果为6-3-2)保留它们。一个重要的论点是,违背去年的决定将存在共阵列是不令人满意的。现在似乎是对新特性进行快速总结的好时机。欲了解更多详细信息,请参阅WG5存储库ftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1649。储存库中项目的J3工作计划http://j3-fortran.org/doc/meeting/176/06-010r2.pdfEach已经给出了估计的严重性级别,如N1594中定义的那样。我将用单独的章节来描述三个大的项目(高于5级),并列出那些严重程度为4或5级的项目。
{"title":"The major features of the next revision of Fortran","authors":"J. Reid","doi":"10.1145/1148105.1148108","DOIUrl":"https://doi.org/10.1145/1148105.1148108","url":null,"abstract":"Two important meetings for the next revision of Fortran were held recently. WG5 met jointly with J3 in Fairfax, Virginia, Feb. 13-17 and J3 met in Las Vegas, May 8-12.The framework was decided at last years' WG5 meeting and was not substantially changed at this year's WG5 meeting. Two large items (bits and intelligent macros) were left as do if time, which made the May J3 meeting important, since the schedule that we have adopted (aiming for the revision to be Fortran 2008) demanded that edits against Fortran 2003 for all the new features be completed at that meeting.In the event both were deemed to be ready, but interoperability of pointers, allocatables, assumed-shape arrays, and optional arguments was not ready and will be deferred to a Technical Report.There was a discussion at the J3 meeting over moving co-arrays to a Technical Report or another part of the standard, despite the WG5 decision at the February meeting that it be a first priority item. However, the major vendors reported pressure from users to provide co-arrays and it was decided (straw vote 6-3-2) to keep them. A significant argument was that it would be unsatisfactory to renege on the decision of last year that co-arrays would be there.This seems a good moment to give a quick summary of the new features. For further details, see the WG5 repositoryftp://ftp.nag.co.uk/sc22wg5/N1601-N1650/N1649.txtand the J3 Work Planhttp://j3-fortran.org/doc/meeting/176/06-010r2.pdfEach of the items in the Repository has been given an estimated severity level, as defined in N1594. I will devote separate sections to the three large items (above level 5) and list those with severity level 4 or 5.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"31 4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116090419","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 1
Interoperability with C in Fortran 2003 在Fortran 2003中与C语言的互操作性
Pub Date : 2006-04-01 DOI: 10.1145/1124708.1124710
A. Donev
One of the major new features in the Fortran 2003 is features for interoperability with C © Interop). The intrinsic module ISO_C_BINDING provides:• constants, mostly type parameters, C_NULL_CHAR, C_NULL_PTR, and others,• types, and in particular, TYPE(C_PTR) and TYPE(C_FUNPTR),• procedures, such as C_LOC, C_FUNLOC, C_F_POINTER, C_F_PROCPOINTER and C_ASSOCIATED.A Fortran interface can be specified for a C function with external linkage and used to invoke such a function. The interface has the characteristic BIND(C) label, and must also satisfy some additional restrictions.C Interop can be used to portably use multi-language codes in Fortran. Since most languages interoperate with C, the feature can actually be used to interoperate with other programming languages as well. C Interop can also be used to give access to Fortran programmers to the many standard libraries with widely-used and implemented C interfaces. This includes lower-level tasks such as interfacing with the OS on UNIX-based systems, or using special libraries like OpenGL.For simple API's, developing Fortran interfaces is practically trivial once one gets some experience. For more complicated API's whose full functionality/power is not needed, such as for example TCP/IP sockets or shared-memory segments on UNIX systems, it is often easier to develop a condensed C API/library that does the actual work, and is simpler to interface to from Fortran. However, for libraries like OpenGL, one should provide a full Fortran interface so that the whole API can be accessed. Doing this manually is not easy and is also error-prone due to the size of the OpenGL/GLU/GLUT interfaces. For certain libraries like MPI, a special Fortran interface may be defined for the purposes of efficiency, portability, ease-of-use, or to accommodate for language semantic differences.In this first paper, we will show how to develop a Fortran interface for a simple C API/library. In a second paper, we consider automating the process so that large and more complex API's, and in particular, OpenGL, can be handled. The source codes can be obtained at http://atom.princeton.edu/donev/F2x.Along the way, we identify some problems with the design of C Interop in Fortran 2003.
Fortran 2003的主要新特性之一是与C语言(©Interop)的互操作性。内部模块ISO_C_BINDING提供:•常量,主要是类型参数,C_NULL_CHAR, C_NULL_PTR等;•类型,特别是type (C_PTR)和type (C_FUNPTR);•过程,如C_LOC, C_FUNLOC, C_F_POINTER, C_F_PROCPOINTER和C_ASSOCIATED。Fortran接口可以为带有外部链接的C函数指定,并用于调用这样的函数。该接口具有BIND(C)标签的特征,并且还必须满足一些附加的限制。C互操作可用于在Fortran中移植使用多语言代码。由于大多数语言都与C语言互操作,因此该特性实际上也可以用于与其他编程语言互操作。C互操作还可以用于为Fortran程序员提供访问许多具有广泛使用和实现的C接口的标准库的权限。这包括较低级别的任务,如在基于unix的系统上与操作系统进行接口,或使用像OpenGL这样的特殊库。对于简单的API,一旦有了一些经验,开发Fortran接口实际上是微不足道的。对于不需要完整功能/功能的更复杂的API,例如UNIX系统上的TCP/IP套接字或共享内存段,通常更容易开发一个浓缩的C API/库来完成实际工作,并且更容易从Fortran进行接口。然而,对于像OpenGL这样的库,应该提供一个完整的Fortran接口,以便可以访问整个API。手动执行此操作并不容易,而且由于OpenGL/GLU/GLUT接口的大小,也容易出错。对于某些库(如MPI),可能会为了效率、可移植性、易用性或适应语言语义差异而定义特殊的Fortran接口。在第一篇文章中,我们将展示如何为一个简单的C API/库开发Fortran接口。在第二篇论文中,我们考虑自动化这个过程,这样就可以处理大型和更复杂的API,特别是OpenGL。源代码可以在http://atom.princeton.edu/donev/F2x.Along上获得,我们找出了在Fortran 2003中设计C互操作时存在的一些问题。
{"title":"Interoperability with C in Fortran 2003","authors":"A. Donev","doi":"10.1145/1124708.1124710","DOIUrl":"https://doi.org/10.1145/1124708.1124710","url":null,"abstract":"One of the major new features in the Fortran 2003 is features for interoperability with C © Interop). The intrinsic module ISO_C_BINDING provides:• constants, mostly type parameters, C_NULL_CHAR, C_NULL_PTR, and others,• types, and in particular, TYPE(C_PTR) and TYPE(C_FUNPTR),• procedures, such as C_LOC, C_FUNLOC, C_F_POINTER, C_F_PROCPOINTER and C_ASSOCIATED.A Fortran interface can be specified for a C function with external linkage and used to invoke such a function. The interface has the characteristic BIND(C) label, and must also satisfy some additional restrictions.C Interop can be used to portably use multi-language codes in Fortran. Since most languages interoperate with C, the feature can actually be used to interoperate with other programming languages as well. C Interop can also be used to give access to Fortran programmers to the many standard libraries with widely-used and implemented C interfaces. This includes lower-level tasks such as interfacing with the OS on UNIX-based systems, or using special libraries like OpenGL.For simple API's, developing Fortran interfaces is practically trivial once one gets some experience. For more complicated API's whose full functionality/power is not needed, such as for example TCP/IP sockets or shared-memory segments on UNIX systems, it is often easier to develop a condensed C API/library that does the actual work, and is simpler to interface to from Fortran. However, for libraries like OpenGL, one should provide a full Fortran interface so that the whole API can be accessed. Doing this manually is not easy and is also error-prone due to the size of the OpenGL/GLU/GLUT interfaces. For certain libraries like MPI, a special Fortran interface may be defined for the purposes of efficiency, portability, ease-of-use, or to accommodate for language semantic differences.In this first paper, we will show how to develop a Fortran interface for a simple C API/library. In a second paper, we consider automating the process so that large and more complex API's, and in particular, OpenGL, can be handled. The source codes can be obtained at http://atom.princeton.edu/donev/F2x.Along the way, we identify some problems with the design of C Interop in Fortran 2003.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"194 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130097482","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
A Sudoku program in Fortran 95 一个用Fortran 95编写的数独程序
Pub Date : 2006-04-01 DOI: 10.1145/1124708.1124709
M. Metcalf
A remarkable craze swept though many countries in the year 2005. Already known and popular in Japan, sudoku was introduced into the UK and thence into other European countries and the USA. Its rules are simple. Given a 9 x 9 grid with some numbers already in place, the solver has to fill in the missing values such that, in each row, each column and each 3 x 3 box, the digits 1 to 9 appear once and once only. The starting digits in this example are arranged symmetrically, which is merely a matter of taste. However, it is widely accepted that a properly formed puzzle has a unique solution and that it can thus be solved, without having to make any guesses, by pure logic.An excellent source of further details is the Wikipedia article at http://en.wikipedia.org/wiki/Sudoku
2005年,一股非凡的热潮席卷了许多国家。数独游戏在日本已经广为人知并广受欢迎,后来又传入英国,然后又传入其他欧洲国家和美国。它的规则很简单。给定一个9 × 9的网格,其中已经有一些数字,求解器必须填充缺失的值,以便在每一行,每列和每个3 × 3框中,数字1到9出现一次且只出现一次。在这个例子中,开始的数字是对称排列的,这只是一个品味问题。然而,人们普遍认为,一个适当形式的谜题有一个唯一的解决方案,因此它可以通过纯逻辑解决,而不必进行任何猜测。进一步细节的极好来源是维基百科的文章http://en.wikipedia.org/wiki/Sudoku
{"title":"A Sudoku program in Fortran 95","authors":"M. Metcalf","doi":"10.1145/1124708.1124709","DOIUrl":"https://doi.org/10.1145/1124708.1124709","url":null,"abstract":"A remarkable craze swept though many countries in the year 2005. Already known and popular in Japan, sudoku was introduced into the UK and thence into other European countries and the USA. Its rules are simple. Given a 9 x 9 grid with some numbers already in place, the solver has to fill in the missing values such that, in each row, each column and each 3 x 3 box, the digits 1 to 9 appear once and once only. The starting digits in this example are arranged symmetrically, which is merely a matter of taste. However, it is widely accepted that a properly formed puzzle has a unique solution and that it can thus be solved, without having to make any guesses, by pure logic.An excellent source of further details is the Wikipedia article at http://en.wikipedia.org/wiki/Sudoku","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"50 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2006-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121369865","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 2
期刊
ACM SIGPLAN Fortran Forum
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1