|
OpenMP Programming Model
- Shared Memory, Thread Based Parallelism
- Explicit Parallelism
- Fork Join Model
- Compiler Directive Based
- Nested Parallelism Support
- Dynamic Threads
OpenMP Directives
Fortran Directive Format
- Format Sentinel directive [clause....]
- Sentinel $OMP or C$OMP or $OMP
- Example $OMP PARALLEL DEFAULT(SHARED)
PRIVATE(BETA,PI)
- General Rules
- Comments can not appear on the same line as a directive
- Several Fortran OpenMP directives come in pair and have the
form shown below
$OMP directive
[Structured block of code]
$OMP end directive
OpenMP Format
C/C++ Directive Format
- Format #pragma omp directive-name [clause....] newline
- Example #pragma omp parallel default(shared) private(beta,pi)
- General Rules
- Case sensitive
- Each directive applies to at most one succeeding segment, which must be a structured block
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|