Introduction OpenMP
Introduction into shared memory
programming with OpenMP.
Contents:
- Shared Memory, shared ressources data race
- OpenMP as shared memory
programming environment
- pragma directives
- parallel for
- critical, atomic, reduction,
- parallel region
- barrier
- private, shared, default(none)
- threadprivate (p. 58ff in notes
of MIT course),
copyprivate
Demonstration:
- Scalar product [demo.skalar]: race condition, atomic, reduction
- demonstrate Intels's thread analyzer
Available compilers:
- GNU:
- Performance analyzer: gprof (kprof); valgrind
(kcachegrind)
- Memory analyzer: valgrind
- Thread analyzer: helgrind
finds data race
- Intel:
- Quick
Reference Card, non-commercial
license available, academic
pricing
- Performance analyzer: amplifier (amplxe-gu)
- Memory/Thread analyzer:
inspector (inspxe-gui) finds data race