📄 31.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif;} a.at-term { font-style: italic; } </style> <title>OpenMP Environment Variables</title> <meta name="Generator" content="ATutor"> <meta name="Keywords" content=""></head><body> <p>A number of environment variables may be set to control aspects of OpenMP execution. The number of threads, loop scheduling, and the enabling of nested parallelism and dynamic adjustment of the number of threads may be controlled in this way. For our present purposes, the two most important variables are: </p>
<ol>
<li>
<p><em>OMP_NUM_THREADS</em>. This should be set to an integer value representing the number of threads requested from the system for parallel regions. Note
that if dynamic thread allocation is enabled (often the default), the system is free to allocate fewer threads than are specified by OMP_NUM_THREADS. If static thread allocation is in effect, the code will terminate if the
system is unable to provide the requested number of threads. </p>
</li>
<li>
<p><em>OMP_SCHEDULE</em>. This variable controls the scheduling for loops that have the <b>runtime</b> scheduling type. It should be set to an expression that is a valid loop scheduling type, for example <var>static</var> or <var>dynamic,10</var>. </p>
</li>
</ol>
<p>Note that the values of the environment variables are case-insensitive. </p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -