blob: ff982cb4b99e1b4ffc61cdc09db61a872cf26e74 [file] [log] [blame]
Jim Cownie5e8470a2013-09-27 10:38:44 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
4<html>
5<head>
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <title>OpenMP* : Support for the OpenMP language</title>
8 <link type="text/css" rel="stylesheet" href="menu.css">
9 <link type="text/css" rel="stylesheet" href="content.css">
10</head>
11
12<body>
13<div id="menu">
14 <div>
15 <a href="http://llvm.org/">LLVM Home</a>
16 </div>
17
18 <div class="submenu">
19 <label>OpenMP Info</label>
20 <a href="/index.html">About</a>
21 </div>
22
23 <div class="submenu">
24 <label>Quick Links</label>
Tanya Lattner856c7322015-08-05 04:04:09 +000025 <a href="http://lists.llvm.org/mailman/listinfo/openmp-dev">openmp-dev</a>
26 <a href="http://lists.llvm.org/mailman/listinfo/openmp-commits">openmp-commits</a>
Jim Cownie5e8470a2013-09-27 10:38:44 +000027 <a href="http://llvm.org/bugs/">Bug Reports</a>
28 <a href="http://llvm.org/svn/llvm-project/openmp/trunk/">Browse SVN</a>
29 <a href="http://llvm.org/viewvc/llvm-project/openmp/trunk/">Browse ViewVC</a>
30 </div>
31</div>
32
33<div id="content">
34 <!--*********************************************************************-->
Jim Cownie4cc4bb42014-10-07 16:25:50 +000035 <h1>OpenMP&reg;: Support for the OpenMP language</h1>
Jim Cownie5e8470a2013-09-27 10:38:44 +000036 <!--*********************************************************************-->
37
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000038 <p>The OpenMP subproject of LLVM contains the
39 components required to build an executable OpenMP program that are
Andrey Churbanove3ebce62015-05-13 13:42:59 +000040 outside the compiler itself.
Jim Cownie5e8470a2013-09-27 10:38:44 +000041 </p>
42
Jim Cownie4cc4bb42014-10-07 16:25:50 +000043 <p>Here you can find :-
44 <ul>
45 <li>
46 the code for the runtime library against which
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000047 code compiled by <tt>clang -fopenmp</tt> must be linked before it
48 can run.
Jim Cownie4cc4bb42014-10-07 16:25:50 +000049 </li>
50 <li>
51 the library that supports offload to target devices (in
52 "offload")
53 </li>
54 <li>
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000055 the OpenUH test-suite used to validate the OpenMP runtime
Jim Cownie4cc4bb42014-10-07 16:25:50 +000056 </li>
57 </ul>
Jim Cownie5e8470a2013-09-27 10:38:44 +000058 </p>
59
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000060 <p>Support for the parts of the OpenMP 4.0 (and later) language that are not
Jim Cownie33f7b242014-04-09 15:40:23 +000061 associated with the "target" constructs are contained in the
62 "runtime" directory. Support for offloading computation via the
63 "target" directive is in the separate "offload" directory. That
64 builds a library that provides the interfaces for transferring code
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000065 and data to attached computational devices such as
66 the Intel&reg Xeon Phi&#0153 coprocessor or GPUs.
67 The README.txt in the "offload"
Jim Cownie33f7b242014-04-09 15:40:23 +000068 directory describes how to build the offload library.
69 </p>
70
Jim Cownie5e8470a2013-09-27 10:38:44 +000071 <p>All of the code here is <a
72 href="http://llvm.org/docs/DeveloperPolicy.html#license">dual licensed</a>
73 under the MIT license and the UIUC License (a BSD-like license).
74 The LICENSE.txt file at the top of the OpenMP project contains
75 the license text and associated patent grants.
76 </p>
77
78 <!--=====================================================================-->
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000079 <h2 id="dir-structure">Status</h2>
80 <!--=====================================================================-->
81
82 <p>With the release of Clang 3.8.0, OpenMP 3.1 support is enabled in
83 Clang by default, and the OpenMP runtime is therefore built as a
84 normal part of the Clang build, and distributed with the binary
85 distributions.You do not, therefore, need explicitly to check out this code, or
86 build it out of tree; a normal Clang check out and build will
87 automatically include building these runtime libraries.
88 </p>
89
90 <!--=====================================================================-->
Jim Cownie5e8470a2013-09-27 10:38:44 +000091 <h2 id="goals">Features and Goals</h2>
92 <!--=====================================================================-->
93
94 <ul>
Jonathan Peytonb5969ca2016-03-18 14:50:01 +000095 <li>Support for the <a href="http://www.openmp.org/mp-documents/OpenMP3.1.pdf">OpenMP
96 3.1 standard (PDF)</a> has been achieved in the Clang 3.8.0
97 release.
98 </li>
99
100 <li>Support for the
101 <a href="http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf">OpenMP
102 4.0 standard (PDF)</a> and <a href="http://www.openmp.org/mp-documents/OpenMP4.5.pdf">OpenMP
103 4.5 standard (PDF)</a> is now being implemented. (Some OpenMP 4.0
104 and 4.5 features are already available).
Jim Cownie5e8470a2013-09-27 10:38:44 +0000105 <li>High performance.</li>
Jim Cownie885d7fa2013-10-03 11:55:28 +0000106 <li>ABI compatibility with <a href="http://gcc.gnu.org">Gcc</a> and
107 <a href="http://software.intel.com/en-us/intel-compilers">Intel's
Jonathan Peyton924a6622016-05-17 20:48:42 +0000108 existing OpenMP compilers.</a>
Jonathan Peytonb5969ca2016-03-18 14:50:01 +0000109 We currently have binary compatibility with OpenMP
Jim Cownie4cc4bb42014-10-07 16:25:50 +0000110 3.1 code compiled by gcc 4.9, however we do not have support
111 for OpenMP 4.0 code that uses task cancellation when compiled
112 by gcc 4.9. How we will support such code remains a research issue.
Jim Cownie885d7fa2013-10-03 11:55:28 +0000113 </li>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000114 </ul>
115
116 <!--=====================================================================-->
117 <h2 id="why">Why have the runtime code here?</h2>
118 <!--=====================================================================-->
119
120 <p>It makes sense to have the runtime sources in the same place
121 (and with the same license) as the compiler.
122 </p>
123
124 <!--=====================================================================-->
125 <h2 id="requirements">Platform Support</h2>
126 <!--=====================================================================-->
127
Jonathan Peytonb5969ca2016-03-18 14:50:01 +0000128 <p>The runtime can be built with gcc, icc or clang. However, note
129 that a runtime built with clang cannot be guaranteed to work with
130 OpenMP code compiled by the other compilers, since clang does not support
131 a 128-bit float type, and cannot therefore generate the code used
132 for reductions of that type (which may occur in user code compiled
133 by the other compilers).
134 </p>
135
Jonathan Peyton924a6622016-05-17 20:48:42 +0000136 <p>The OpenMP runtime is known to work on
Jim Cownie4cc4bb42014-10-07 16:25:50 +0000137 <ul>
138 <li>ARM&reg;&nbsp; architecture processors</li>
139 <li>PowerPC&trade;&nbsp; processors</li>
140 <li>32 and 64 bit X86
141 processors when compiled with clang, with the Intel compiler
142 or with gcc, and also the Intel&reg;&nbsp;Xeon Phi&trade; product family, when compiled with
143 the Intel compiler.
144 </li>
Sylvestre Ledrucd9d3742016-12-08 09:22:24 +0000145 <li>MIPS and MIPS64</li>
Jim Cownie4cc4bb42014-10-07 16:25:50 +0000146 </ul>
147 Ports to other architectures and operating systems are welcome.
Jim Cownie5e8470a2013-09-27 10:38:44 +0000148 </p>
Jonathan Peyton924a6622016-05-17 20:48:42 +0000149
150 <p>A full OS and archiecture compatibility matrix is in
Jim Cownie885d7fa2013-10-03 11:55:28 +0000151 <a href="README.txt">README.txt</a>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000152 </p>
153
154
155 <!--=====================================================================-->
Jim Cownie5e8470a2013-09-27 10:38:44 +0000156 <h2>Get it and get involved!</h2>
157 <!--=====================================================================-->
158
159 <p>First please review our
160 <a href="http://llvm.org/docs/DeveloperPolicy.html">Developer's Policy</a>.
161
162 <p>To check out the code, use:</p>
163
164 <ul>
165 <li><code>svn co http://llvm.org/svn/llvm-project/openmp/trunk openmp</code></li>
166 </ul>
167
168 <p>
Jonathan Peyton89776182015-09-14 17:20:30 +0000169 Note that for an in-tree build, you should check out openmp to llvm/projects.
Jim Cownie5e8470a2013-09-27 10:38:44 +0000170 </p>
Jonathan Peyton89776182015-09-14 17:20:30 +0000171
172 <p>In-tree build:</p>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000173 <ul>
Jonathan Peyton89776182015-09-14 17:20:30 +0000174 <li><code>cd where-you-want-to-live</code></li>
175 <li>Check out openmp into llvm/projects</li>
176 <li><code>cd where-you-want-to-build</code></li>
177 <li><code>mkdir build &amp;&amp; cd build</code></li>
178 <li><code>cmake path/to/llvm -DCMAKE_C_COMPILER=&lt;C compiler&gt; -DCMAKE_CXX_COMPILER=&lt;C++ compiler&gt;</code></li>
179 <li><code>make omp</code></li>
180 </ul>
181
182 <p>Out-of-tree build:</p>
183 <ul>
184 <li><code>cd where-you-want-to-live</code></li>
185 <li>Check out openmp</li>
Jonas Hahnfeld3e921d32017-11-29 19:31:43 +0000186 <li><code>cd where-you-want-to-live/openmp</code></li>
Jonathan Peyton89776182015-09-14 17:20:30 +0000187 <li><code>mkdir build &amp;&amp; cd build</code></li>
188 <li><code>cmake path/to/openmp -DCMAKE_C_COMPILER=&lt;C compiler&gt; -DCMAKE_CXX_COMPILER=&lt;C++ compiler&gt;</code></li>
189 <li><code>make</code></li>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000190 </ul>
Jonathan Peyton924a6622016-05-17 20:48:42 +0000191
Jim Cownie5e8470a2013-09-27 10:38:44 +0000192 <p>Full details of how to build are in the
Jonas Hahnfeld2e809ac2017-12-27 09:15:10 +0000193 <a href="README.txt">README.txt</a> and README.rst in the source code repository.
Jim Cownie5e8470a2013-09-27 10:38:44 +0000194 </p>
195
196 <!--=====================================================================-->
197 <h3>Notes</h3>
198 <!--=====================================================================-->
199
200<p>
201
202</p>
203
204 <p>Send discussions to the
Tanya Lattner856c7322015-08-05 04:04:09 +0000205 (<a href="http://lists.llvm.org/mailman/listinfo/openmp-dev">OpenMP mailing list</a>).</p>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000206
207
208 <!--=====================================================================-->
209 <h2>Design Documents</h2>
210 <!--=====================================================================-->
211
212<ul>
Jim Cownie885d7fa2013-10-03 11:55:28 +0000213<li><a href="Reference.pdf">Runtime design (PDF)</a></li>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000214</ul>
215
Jim Cownie885d7fa2013-10-03 11:55:28 +0000216 <!--=====================================================================-->
217 <h2>Copyright notices</h2>
218 <!--=====================================================================-->
219<ul>
220<li>
221 The OpenMP name and the OpenMP logo are registered trademarks of the
222 OpenMP Architecture Review Board.
223</li>
224<li>
225 Intel is a trademark of Intel Corporation in the U.S. and/or other
226 countries.
227</li>
Jim Cownie4cc4bb42014-10-07 16:25:50 +0000228<li>
229 PowerPC is a trademark of IBM Corporation in the U.S. and/or other
230 countries.
231</li>
232<li>
233 ARM is a trademark of ARM Corporation in the U.S. and/or
234 other countries.
235</li>
Sylvestre Ledrucd9d3742016-12-08 09:22:24 +0000236<li>
237 MIPS is a trademark of MIPS Computer Systems in the U.S. and/or
238 other countries.
239</li>
Jim Cownie885d7fa2013-10-03 11:55:28 +0000240</ul>
Jim Cownie5e8470a2013-09-27 10:38:44 +0000241</div>
242</body>
243</html>