7.1) OpenMP
OpenMP is the standard for shared memory programming, and is supported by the compilers installed on ARC2. It provides a standard set of directives, run time library routines and environment variables to enable parallelising code under a shared memory model.
There are a number of advantages to using OpenMP:
- Can parallelise existing code incrementally
- Provide a relatively simple set of directives
- Works on shared data, so do not need to manage communications
There are also some disadvantages, such as:
- Requires and is restricted to shared memory machines
- Programmer needs to specify what data is shared between different processes and what should be private to each process
- Shared data, means can get contention for data