icp/oer/courses/c-openmp/sections/01-introduction/01-numthreads/content.md

11 lines
501 B
Markdown

In this exercise you learn how to specify the number of threads.
## Knowledge
Many of the omp directives can be further specified by clauses. Among others you can specify shared variables or private ones.
With the clause ``num_threads()`` you can tell the compiler, how many threads are supposed to run the code.
To find out which clauses can be used with each directive, check the [quick reference](http://openmp.org/mp-documents/OpenMP3.1-CCard.pdf).
## Task
Run the code on 7 different threads.