Next: Control Parallelism Example
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