rsnt_translations
56,420
edits
(Marked this version for translation) |
No edit summary |
||
Line 167: | Line 167: | ||
</translate> | </translate> | ||
<pre> | <pre> | ||
OMP_NUM_THREADS | |||
OMP_SCHEDULE | OMP_SCHEDULE | ||
OMP_DYNAMIC | OMP_DYNAMIC | ||
OMP_STACKSIZE | |||
OMP_NESTED | OMP_NESTED | ||
</pre> | </pre> | ||
<translate> | <translate> | ||
<!--T:13--> | <!--T:13--> | ||
They can be set and modified using | They can be set and modified using a UNIX command sucha as | ||
{{command|export OMP_NUM_THREADS{{=}}12}} | {{command|export OMP_NUM_THREADS{{=}}12}} | ||
In most cases, you want to set <tt>OMP_NUM_THREADS</tt> to the number of reserved cores per machine though this could be different for a hybrid OpenMP/MPI application. | |||
<!--T:14--> | <!--T:14--> | ||
The second most important environment variable is probably <tt>OMP_SCHEDULE</tt>. This one controls how loops (and, more generally, parallel sections) are distributed. The default value depends on the compiler, and can also be added into the source code. Possible values are | The second most important environment variable is probably <tt>OMP_SCHEDULE</tt>. This one controls how loops (and, more generally, parallel sections) are distributed. The default value depends on the compiler, and can also be added into the source code. Possible values are ''static,n'', ''dynamic,n'', ''guided,n'' or ''auto''. For the first three cases, ''n'' corresponds to the number of iterations managed by each thread. For the ''static'' case, the number of iterations is fixed, and iterations are distributed at the beginning of the parallel section. For the ''dynamic'' case, the number of iterations is fixed, but they are distributed during execution, as a function of the time required by each thread to execute its iterations. For the ''guided'' case, ''n'' corresponds to the minimal number of iterations. The number of iterations is first chosen to be "large", but dynamically shrinks gradually as the remaining number of iterations diminishes. For the ''auto'' mode, the compiler and the library are free to choose what to do. | ||
''static,n'', ''dynamic,n'', ''guided,n'' or ''auto''. For the first three cases, ''n'' corresponds to the number of iterations managed by each thread. For the ''static'' case, the number of iterations is fixed, and iterations are distributed at the beginning of the parallel section. For the ''dynamic'' case, the number of iterations is fixed, but they are distributed during execution, as a function of the time required by each thread to execute its iterations. For the ''guided'' case, ''n'' corresponds to the minimal number of iterations. The number of iterations is first chosen to be "large", but dynamically shrinks gradually as the remaining number of iterations diminishes. For the ''auto'' mode, the compiler and the library are free to choose what to do. | |||
<!--T:15--> | <!--T:15--> |