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 task-level, concurrency. They would benefit from multithreading, especially on symmetric multiprocessors (SMP). We present 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 has been demonstrated using common mathematical computations on several SMP systems.
[1]
David R. Butenhof.
Programming with POSIX threads
,
1993
.
[2]
Jack Dongarra,et al.
Pvm: A Users' Guide and Tutorial for Network Parallel Computing
,
1994
.
[3]
Bradford Nichols,et al.
Pthreads programming
,
1996
.
[4]
Jack Dongarra,et al.
MPI: The Complete Reference
,
1996
.
[5]
Jerrold L. Wagener,et al.
Fortran 95 Handbook
,
1997
.
[6]
Bil Lewis,et al.
Multithreaded Programming With PThreads
,
1997
.
[7]
Jack Dongarra,et al.
MPI - The Complete Reference: Volume 1, The MPI Core
,
1998
.
[8]
C. Breshears,et al.
Towards a Fortran 90 Interface to the POSIX Threads Library
,
1998
.
[9]
Richard J. Hanson,et al.
Using A Fortran Interface to POSIX Threads
,
2000,
The Architecture of Scientific Software.