OpenMP-compilation.pdf
(
221 KB
)
Pobierz
How
is
Compiled
Barbara Chapman, Lei Huang
University of Houston
Acknowledgements:
Slides here were also contributed by the HPCTools Group of the University of Houston.
1
* The name “OpenMP” is the property of the OpenMP Architecture Review Board.
*
OpenMP
How Does OpenMP Enable Us to
Exploit Threads?
OpenMP provides thread programming model at
a “high level”.
The user does not need to specify all the details
–
Especially with respect to the assignment of work to threads
–
Creation of threads
User makes strategic decisions
Compiler figures out details
Alternatives:
MPI
POSIX thread library is lower level
Automatic parallelization is even higher level (user does nothing)
–
But usually successful on simple codes only
2
OpenMP Parallel Computing Solution Stack
User layer
End User
Application
Directives,
Compiler
Environment
variables
Prog. Layer
(OpenMP API)
OpenMP library
System layer
Runtime library
OS/system support for shared memory.
3
Recall Basic Idea: How OpenMP
Works
User
must decide what is parallel in program
Makes any changes needed to original source code
E.g. to remove any dependences in parts that
should run in parallel
User
inserts directives telling compiler how
statements are to be executed
what parts of the program are parallel
how to assign code in parallel regions to threads
what data is private (local) to threads
4
How The User Interacts with Compiler
Compiler
generates explicit threaded code
shields user from many details of the multithreaded
code
Compiler
figures out details of code each
thread needs to execute
Compiler does
not
check that programmer
directives are correct!
Programmer must be sure the required
synchronization is inserted
The result is a multithreaded object program
5
Plik z chomika:
m_r_k
Inne pliki z tego folderu:
code.zip
(296 KB)
wy1.pdf
(284 KB)
CSS.XHTML.video.kurs.rar
(582334 KB)
2008. Wrox Professional CSS Cascading Style Sheets for Web Design 2nd Edition.pdf
(18144 KB)
0131473816_book.pdf
(6963 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
Android Programming
c#
c_c++
Zgłoś jeśli
naruszono regulamin