Skip to main content

A General Approach to Creating Fortran Interface for C++ Application Libraries

  • Conference paper
  • 1394 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/3-540-27912-1_14
  • Chapter length: 10 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   169.00
Price excludes VAT (USA)
  • ISBN: 978-3-540-27912-9
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   219.99
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Google Scholar 

  2. www.starlink.rl.ac.uk/static www/soft further CNF.html

    Google Scholar 

  3. Dahlgren, T., Epperly, T., Kumfert, G., and Leek, J.: Babel Users’ Guide. www.llnl.gov/CASC/components/docs/users guide.pdf (2004)

    Google Scholar 

  4. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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