Creating Parallel Regions
- Only one way to create threads in OpenMP API:
- Fortran:
-
-
-
- C/C++:
-
-
-
-
- Replicate execution:
C$OMP PARALLEL [clause[,clause]…]
#pragma omp parallel [clause[,clause]…]
Number of threads specified by user:
library: call omp_set_num_threads(128)
Environment: setenv OMP_NUM_THREADS 128
Data association rules(shared,private, etc.) have to be specified at start of parallel region (default shared)