OMP_005fPLACES.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 2006-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>GNU libgomp: OMP_PLACES</title>
  20. <meta name="description" content="GNU libgomp: OMP_PLACES">
  21. <meta name="keywords" content="GNU libgomp: OMP_PLACES">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Library-Index.html#Library-Index" rel="index" title="Library Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Environment-Variables.html#Environment-Variables" rel="up" title="Environment Variables">
  30. <link href="OMP_005fSTACKSIZE.html#OMP_005fSTACKSIZE" rel="next" title="OMP_STACKSIZE">
  31. <link href="OMP_005fPROC_005fBIND.html#OMP_005fPROC_005fBIND" rel="prev" title="OMP_PROC_BIND">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="OMP_005fPLACES"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="OMP_005fSTACKSIZE.html#OMP_005fSTACKSIZE" accesskey="n" rel="next">OMP_STACKSIZE</a>, Previous: <a href="OMP_005fPROC_005fBIND.html#OMP_005fPROC_005fBIND" accesskey="p" rel="prev">OMP_PROC_BIND</a>, Up: <a href="Environment-Variables.html#Environment-Variables" accesskey="u" rel="up">Environment Variables</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html#Library-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="OMP_005fPLACES-_002d_002d-Specifies-on-which-CPUs-the-theads-should-be-placed"></a>
  69. <h3 class="section">3.10 <code>OMP_PLACES</code> &ndash; Specifies on which CPUs the theads should be placed</h3>
  70. <a name="index-Environment-Variable-9"></a>
  71. <dl compact="compact">
  72. <dt><em>Description</em>:</dt>
  73. <dd><p>The thread placement can be either specified using an abstract name or by an
  74. explicit list of the places. The abstract names <code>threads</code>, <code>cores</code>
  75. and <code>sockets</code> can be optionally followed by a positive number in
  76. parentheses, which denotes the how many places shall be created. With
  77. <code>threads</code> each place corresponds to a single hardware thread; <code>cores</code>
  78. to a single core with the corresponding number of hardware threads; and with
  79. <code>sockets</code> the place corresponds to a single socket. The resulting
  80. placement can be shown by setting the <code>OMP_DISPLAY_ENV</code> environment
  81. variable.
  82. </p>
  83. <p>Alternatively, the placement can be specified explicitly as comma-separated
  84. list of places. A place is specified by set of nonnegative numbers in curly
  85. braces, denoting the denoting the hardware threads. The hardware threads
  86. belonging to a place can either be specified as comma-separated list of
  87. nonnegative thread numbers or using an interval. Multiple places can also be
  88. either specified by a comma-separated list of places or by an interval. To
  89. specify an interval, a colon followed by the count is placed after after
  90. the hardware thread number or the place. Optionally, the length can be
  91. followed by a colon and the stride number &ndash; otherwise a unit stride is
  92. assumed. For instance, the following specifies the same places list:
  93. <code>&quot;{0,1,2}, {3,4,6}, {7,8,9}, {10,11,12}&quot;</code>;
  94. <code>&quot;{0:3}, {3:3}, {7:3}, {10:3}&quot;</code>; and <code>&quot;{0:2}:4:3&quot;</code>.
  95. </p>
  96. <p>If <code>OMP_PLACES</code> and <code>GOMP_CPU_AFFINITY</code> are unset and
  97. <code>OMP_PROC_BIND</code> is either unset or <code>false</code>, threads may be moved
  98. between CPUs following no placement policy.
  99. </p>
  100. </dd>
  101. <dt><em>See also</em>:</dt>
  102. <dd><p><a href="OMP_005fPROC_005fBIND.html#OMP_005fPROC_005fBIND">OMP_PROC_BIND</a>, <a href="GOMP_005fCPU_005fAFFINITY.html#GOMP_005fCPU_005fAFFINITY">GOMP_CPU_AFFINITY</a>, <a href="omp_005fget_005fproc_005fbind.html#omp_005fget_005fproc_005fbind">omp_get_proc_bind</a>,
  103. <a href="OMP_005fDISPLAY_005fENV.html#OMP_005fDISPLAY_005fENV">OMP_DISPLAY_ENV</a>
  104. </p>
  105. </dd>
  106. <dt><em>Reference</em>:</dt>
  107. <dd><p><a href="http://www.openmp.org/">OpenMP specification v4.5</a>, Section 4.5
  108. </p></dd>
  109. </dl>
  110. <hr>
  111. <div class="header">
  112. <p>
  113. Next: <a href="OMP_005fSTACKSIZE.html#OMP_005fSTACKSIZE" accesskey="n" rel="next">OMP_STACKSIZE</a>, Previous: <a href="OMP_005fPROC_005fBIND.html#OMP_005fPROC_005fBIND" accesskey="p" rel="prev">OMP_PROC_BIND</a>, Up: <a href="Environment-Variables.html#Environment-Variables" accesskey="u" rel="up">Environment Variables</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Library-Index.html#Library-Index" title="Index" rel="index">Index</a>]</p>
  114. </div>
  115. </body>
  116. </html>