{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

OMP - OpenMP Programming Aiichiro Nakano Collaboratory for...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
OpenMP Programming Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science University of Southern California Email: [email protected]
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
OpenMP Portable application program interface (API) for shared-memory parallel programming based on multi-threading by compiler directives OpenMP = Open specifications for M ulti P rocessing OpenMP homepage www.openmp.org OpenMP tutorial www.llnl.gov/computing/tutorials/openMP Process: an instance of program running Thread: a sequence of instructions being executed, possibly sharing resources with other threads within a process MPI (distributed memory) OpenMP (shared memory) send receive share
Background image of page 2
OpenMP Programming Model Fork-join parallelism Fork: master thread spawns a team of threads as needed Join: when the team of threads complete the statements in the parallel section, they terminate synchronously, leaving only the master thread OpenMP threads communicate by sharing variables
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
OpenMP Example: omp_example.c #include <stdio.h>
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}