- Directives
- atomic
- parallel
Notes
- Expansion on example A.12 from the standards document
- Broke early compilers
- Uses Atomic to avoid race conditions while updating different elements of an array in parallel
- Directives
- parallel
- parallel private
- threadprivate
Notes
- Complex usage of threadprivate
- Threadprivate of common blocks, also in a module
- Shows how to maintain data between parallel regions
- Directives
- parallel
- critical
- threadprivate
Notes
- Shows how to use critical so that only one thread is in a parallel section
- Directives
- parallel
- critical
- parallel private
Notes
- Each thread allocates its own array
- Array data is saved between parallel sections
- Thread private derived type
- Broke early compilers
- Directives
- omp parallel sections
- sections
Notes
- High level parallelizm, not loop level
- Does a collection of independent matrix inversions in parallel
- Very interesting to run with different numbers of threads
- Directives
- omp parallel
- task
Notes
- High level parallelizm, not loop level
- Does a collection of independent matrix inversions in parallel
- Very interesting to run with different numbers of threads
- Directives
- parallel
- critical
- parallel private
Notes
- Each thread allocates its own array
- Array data is saved between parallel sections
- Thread private derived type
- Broke early compilers
- Directives
- parallel
Notes
- Shows what can happen if you don't use a critical directive when you should
- Results are nondeterministic
- Don't do this
- See withcrit.f90
- Directives
- parallel
- critical
Notes
- Corrected version of withoutcrit.f90
- Always returns the expected result
- See withoutcrit.f90
- Directives
- parallel
- private
Notes
- A variation of withoutcrit.f90
- Always returns the expected result
- See withoutcrit.f90
- Directives
- parallel do
- private
- schedule (runtime)
Notes
- Does 2d FFT by parsing out 1d FFT using a parallel do
- Pseudo high level parallelizm
- Can experiment with runtime specification of scheduling
- Directives
- parallel for copyin() schedule()
- private
- threadprivate
- critical
Notes
- A complex test of thread private with a do loop
- We do various manipulations of private pointers and structures
- Can experiment with runtime specification of scheduling
- Directives
- parallel for schedule(static,1)
- parallel for schedule(static,2)
- parallel for schedule(dynamic,1)
- parallel for schedule(dynamic,2)
- barrier
Notes
- Shows the effect of different schule directives
- Threads are given balanced amount of work
- Threads are given different amount of work
- Directives
- parallel for schedule(static,1)
- parallel for schedule(static,2)
- parallel for schedule(dynamic,1)
- parallel for schedule(dynamic,2)
- barrier
Notes
- Shows the effect of different schule directives
- Threads are given balanced amount of work
- Threads are given different amount of work
- Directives
- omp parallel shared() default() private()
- single
- critical
- Notes
- Use single so an array only gets allocated one time
- Shows how to do seudo loop level parallelizm without the for/do directive
- show
- Directives
- section
- sections
- threadprivate
- Notes
- Does a parallel recursive merge sort by handing out sections of the array to threads
openmp.pdf - a somewhat dated guide to OpenMP programming
makefile - Makefile for the Intel compilers
openmp.tar - a tar file with all of these files