Abstract
Pthreads is the library of POSIX standard functions for concurrent, multithreaded programming. The POSIX standard only defines an application programming interface (API) to the C programming language, not to Fortran. Many scientific and engineering applications are written in Fortran. Also, many of these applications exhibit functional, or tasklevel, concurrency. They would benefit from multithreading, especially on symmetric multiprocessors (SMP). We summarize here an interface to that part of the Pthreads library that is compatible with standard Fortran. The contribution consists of two primary source files: a Fortran module and a collection of C wrappers to Pthreads functions. The Fortran module defines the data structures, interface and initialization routines used to manage threads. The stability and portability of the Fortran API to Pthreads is demonstrated using common mathematical computations on three different systems.
This paper is a shortened and slightly modified version of a complete Algorithm submitted for publication to the journal ACM Trans. Math. Software, during July, 2000.
The original version of this chapter was revised: The copyright line was incorrect. This has been corrected. The Erratum to this chapter is available at DOI: 10.1007/978-0-387-35407-1_22
Chapter PDF
References
Adams, J. C., Brainerd, W. S., Martin, J. T., Smith, B. T., and Wagener, J. L. 1997. Fortran 95 Handbook. The MIT Press, Cambridge, MA.
Butenhof, D. R. 1997. Programming with POSIX Threads. Addison-Wesley, Reading, MA.
Butenhof, D. R. 1999. Personal communication.
Geist, A., Beguelin, A., Dongarra, J., Jiang, W., Manchek, R., and Sunderam, V. 1994. PVM: A Users’ Guide and Tutorial for Network Parallel Computing. The MIT Press, Cambridge, MA.
Hanson, R. J., Breshears, C. P., Gabb, H. A. “A Fortran Interface to POSIX Threads,” submitted to ACM Trans. Math. Software, during July, 2000.
IEEE/ANSI Std 1003. 1 1996 Edition] Information Technology, Portable Operating System Interface (POSIX), Part 1: System Application: Program Interface (API) [C Language] (ANSI).
Lewis, B. and Berg, D. J. 1998. Multithreaded Programming with Pthreads. Sun Microsystems Press, Mountain View, CA.
Nichols, B., Buttlar, D., and Farrell, J. P. 1996. Pthreads Programming. O’Reilly and Associates, Sebastopol, CA.
Snir, M., Otto, S., Huss-Lederman, S., Walker, D., and Dongarra, J. 1998. MPI The Complete Reference: Volume 1, the MPI Core. The MIT Press, Cambridge, MA.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 IFIP International Federation for Information Processing
About this chapter
Cite this chapter
Hanson, R.J., Breshears, C.P., Gabb, H.A. (2001). Using a Fortran Interface to Posix Threads. In: Boisvert, R.F., Tang, P.T.P. (eds) The Architecture of Scientific Software. IFIP — The International Federation for Information Processing, vol 60. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-35407-1_15
Download citation
DOI: https://doi.org/10.1007/978-0-387-35407-1_15
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4757-6719-3
Online ISBN: 978-0-387-35407-1
eBook Packages: Springer Book Archive