Parallel Programming in Fortran 95 using OpenMP - People
Parallel Programming in Fortran 95 using OpenMP - People
Parallel Programming in Fortran 95 using OpenMP - People
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2 1. <strong>OpenMP</strong> <strong>Fortran</strong> Application Program Interface<br />
1.1.1 Historical remarks<br />
Shared-memory mach<strong>in</strong>es exist nowadays for a long time. In the past, each vendor was develop<strong>in</strong>g<br />
its own ”standard” of compiler directives and libraries, which allowed a program<br />
to make use of the capabilities of their specific parallel mach<strong>in</strong>e.<br />
An earlier standardization effort, ANSI X3H5 was never formally adopted, s<strong>in</strong>ce on one<br />
hand no strong support of the vendors was exist<strong>in</strong>g and on the other hand distributed<br />
memory mach<strong>in</strong>es, with their own more standard message pass<strong>in</strong>g libraries PVM and<br />
MPI, appeared as a good alternative to shared-memory mach<strong>in</strong>es.<br />
But <strong>in</strong> 1996-1997, a new <strong>in</strong>terest <strong>in</strong> a standard shared-memory programm<strong>in</strong>g <strong>in</strong>terface<br />
appeared, ma<strong>in</strong>ly due to:<br />
1. A renewed <strong>in</strong>terest from the vendors side <strong>in</strong> shared-memory architectures.<br />
2. The op<strong>in</strong>ion by a part of the vendors, that the parallelization of programs us<strong>in</strong>g<br />
message pass<strong>in</strong>g <strong>in</strong>terfaces is cumbersome and long and that a more abstract programm<strong>in</strong>g<br />
<strong>in</strong>terface would be desirable.<br />
<strong>OpenMP</strong> 1 is the result of a large agreement between hardware vendors and compiler<br />
developers and is considered to be an ”<strong>in</strong>dustry standard”: it specifies a set of compiler<br />
directives, library rout<strong>in</strong>es, and environment variables that can be used to specify sharedmemory<br />
parallelism <strong>in</strong> <strong>Fortran</strong> and C/C++ programs.<br />
<strong>OpenMP</strong> consolidates all this <strong>in</strong>to a s<strong>in</strong>gle syntax and semantics and f<strong>in</strong>ally delivers<br />
the long-awaited promise of s<strong>in</strong>gle source portability for shared-memory parallelism. But<br />
<strong>OpenMP</strong> is even more: it also addresses the <strong>in</strong>ability of previous shared-memory directive<br />
sets to deal with coarse-gra<strong>in</strong> parallelism 2 . In the past, limited support for coarse<br />
gra<strong>in</strong> work has led to developers to th<strong>in</strong>k that shared-memory parallel programm<strong>in</strong>g was<br />
<strong>in</strong>herently limited to f<strong>in</strong>e-gra<strong>in</strong> parallelism 3 .<br />
1.1.2 Who is participat<strong>in</strong>g<br />
The <strong>OpenMP</strong> specification is owned, written and ma<strong>in</strong>ta<strong>in</strong>ed by the <strong>OpenMP</strong> Architecture<br />
Review Board, which is a jo<strong>in</strong> of the companies actively tak<strong>in</strong>g part <strong>in</strong> the<br />
development of the standard shared-memory programm<strong>in</strong>g <strong>in</strong>terface. In the year 2000,<br />
the permanent members of the <strong>OpenMP</strong> ARB were:<br />
• US Department of Energy, through its ASCI program<br />
• Compaq Computer Corp.<br />
1 MP stands for Multi Process<strong>in</strong>g and Open means that the standard is def<strong>in</strong>ed through a specification<br />
accessible to anyone.<br />
2 Coarse-gra<strong>in</strong> parallelism means that the parallelism <strong>in</strong> the program is achieved through a decomposition<br />
of the target doma<strong>in</strong> <strong>in</strong>to a set of subdoma<strong>in</strong>s that is distributed over the different processors of<br />
the mach<strong>in</strong>e.<br />
3 F<strong>in</strong>e-gra<strong>in</strong> parallelism means that the parallelism <strong>in</strong> the program is achieved by distribut<strong>in</strong>g the<br />
work of the do-loops over the different processors, so that each processor computes part of the iterations.