Next: Control Parallelism Example
Up: OpenMPLab
Previous: Setup and Hello World
- Copy omp_workshare1.c from section 3 of https://computing.llnl.gov/tutorials/openMP/exercise.html.
- Review the source code to understand the data parallelism introduced by the for directive.
- Compile it and run it with 4 threads
- Now run it with a sort to make the output more comprehensible as follows:
omp_workshare1 | sort
Phil Trinder
2013-02-28