next up previous
Next: Control Parallelism Example Up: OpenMPLab Previous: Setup and Hello World

Data Parallelism Example

  1. Copy omp_workshare1.c from section 3 of https://computing.llnl.gov/tutorials/openMP/exercise.html.
  2. Review the source code to understand the data parallelism introduced by the for directive.
  3. Compile it and run it with 4 threads
  4. Now run it with a sort to make the output more comprehensible as follows:
    omp_workshare1 | sort



Phil Trinder 2013-02-28