Parallel Regions(contd.)
Using replicated execution
- make each thread work on different data
- Do work based on thread number in team
- Use library routine: iam = omp_get_thread_num()
Number of threads specified by user
- Use library routine: call omp_set_num_threads(128)
- Applies to next parallel region
- Environment variable setenv OMP_NUM_THREADS 128
Implementation Default < Environment variable < Runtime Library call