Summary
Incorporating various specialty libraries in different programming languages (FORTRAN and C/C++) with the main body of the source code remains a major challenge for developing scientific and engineering application software packages. The main difficulty originates from the fact that Fortran 90/95 pointers and C/C++ pointers are structurally different. In this paper, we present a technique that allows us to circumvent this difficulty without using any nonstandard features of these programming languages. This technique has helped us to develop a FORTRAN 90/95 interface for the GrACE library, which is written in C++ for facilitating spacial grid generation, adaptive mesh refinement, and load balance maintenance. The method outlined in this presentation provides a general guideline for the creation of the FORTRAN 90/95 interface for a C/C++ library. We show that this method is system independent and has low overhead cost, and can be easily extended to situations where building the C/C++ interface for a FORTRAN 90/95 application library is required.
Key words
- FORTRAN
- C/C++
- pointers
- inter-language calling
- interface
This is a preview of subscription content, access via your institution.
Buying options
Preview
Unable to display preview. Download preview PDF.
References
Armstrong, B., Geist, A., Keahey, K., Kohn, S., McInnes, L., Parker, S., and Smolinski, B.: Toward a Common Component Architecture for High-Performance Scientific Computing. 8th IEEE International Symposium on High-Performance Distributed Computing, Redondo Beach, CA (1999)
www.starlink.rl.ac.uk/static www/soft further CNF.html
Dahlgren, T., Epperly, T., Kumfert, G., and Leek, J.: Babel Users’ Guide. www.llnl.gov/CASC/components/docs/users guide.pdf (2004)
Parashar, M. and Browne, J.C.: Systems Engineering for High Performance Computing Software-The HDDA/DAGH Infrastructure for Implementation of Parallel Structured Adaptive Mesh Refinement. IMA Volume 117, Editors: S.B. Baden, N.P. Chrisochoides, D.B. Gannon, and M.L. Norman, Springer-Verlag, pp. 1–18 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Wang, Y. et al. (2005). A General Approach to Creating Fortran Interface for C++ Application Libraries. In: Zhang, W., Tong, W., Chen, Z., Glowinski, R. (eds) Current Trends in High Performance Computing and Its Applications. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-27912-1_14
Download citation
DOI: https://doi.org/10.1007/3-540-27912-1_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-25785-1
Online ISBN: 978-3-540-27912-9
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)