 Shared Memory, Thread Based Parallelism:
Shared Memory, Thread Based Parallelism:
- OpenMP is based upon the existence of multiple threads in the shared
    memory programming paradigm.  A shared memory process consists of
    multiple threads.
 Explicit Parallelism:
 Explicit Parallelism:
- OpenMP is an explicit (not automatic) programming
    model, offering the programmer full control over parallelization.
 Fork - Join Model:
 Fork - Join Model:
- OpenMP uses the fork-join model of parallel execution:
 
 
 
 
- All OpenMP programs begin as a single process: the
    master thread.
    The master thread executes sequentially until the
    first parallel region
    construct is encountered.
 
- FORK: the master thread then creates a team of
    parallel threads
 
- The statements in the program that are enclosed by the parallel
    region construct are then executed in parallel among the various team
    threads
 
- JOIN: When the team threads complete the statements in the parallel
    region construct, they synchronize and terminate, leaving only the master
    thread
 Compiler Directive Based:
Compiler Directive Based:
- Most OpenMP parallelism is specified through the use of
    compiler directives which are imbedded in C/C++ or Fortran source code.
 Nested Parallelism Support:
Nested Parallelism Support:
- The API provides for the placement of parallel constructs inside of
    other parallel constructs.
 
- Implementations may or may not support this feature.
 Dynamic Threads:
Dynamic Threads:
- The API provides for dynamically altering the number of threads which
    may used to execute different parallel regions.
 
- Implementations may or may not support this feature.
 I/O:
I/O:
- OpenMP specifies nothing about parallel I/O. This is
    particularly important if multiple threads attempt to write/read from
    the same file.
 
- If every thread conducts I/O to a different file, the issues are not
    as significant.
 
- It is entirely up to the programmer to insure that I/O is conducted
    correctly within the context of a multi-threaded program.
 Memory Model: FLUSH Often?
Memory Model: FLUSH Often?
- OpenMP provides a "relaxed-consistency" and "temporary" view of
    thread memory (in their words). In other words, threads can "cache"
    their data and are not required to maintain exact consistency with real
    memory all of the time.
 
- When it is critical that all threads view a shared variable identically,
    the programmer is responsible for insuring that the variable is FLUSHed
    by all threads as needed.
 
- More on this later...