1<!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="https://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> 25 <a href="https://lists.llvm.org/mailman/listinfo/openmp-dev">openmp-dev</a> 26 <a href="https://lists.llvm.org/mailman/listinfo/openmp-commits">openmp-commits</a> 27 <a href="https://bugs.llvm.org/">Bug Reports</a> 28 <a href="https://github.com/llvm/llvm-project/tree/master/openmp">Browse Sources</a> 29 </div> 30</div> 31 32<div id="content"> 33 <!--*********************************************************************--> 34 <h1>OpenMP®: Support for the OpenMP language</h1> 35 <!--*********************************************************************--> 36 37 <p>The OpenMP subproject of LLVM contains the 38 components required to build an executable OpenMP program that are 39 outside the compiler itself. 40 </p> 41 42 <p>Here you can find :- 43 <ul> 44 <li> 45 the code for the runtime library against which 46 code compiled by <tt>clang -fopenmp</tt> must be linked before it 47 can run. 48 </li> 49 <li> 50 the library that supports offload to target devices (in 51 "libomptarget") 52 </li> 53 </ul> 54 </p> 55 56 <p>Support for the parts of the OpenMP 4.0 (and later) language that are not 57 associated with the "target" constructs are contained in the 58 "runtime" directory. Support for offloading computation via the 59 "target" directive is in the separate "libomptarget" directory. 60 </p> 61 62 <p>All of the code here is <a 63 href="https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents">dual licensed</a> 64 under the MIT license and the UIUC License (a BSD-like license). 65 The LICENSE.txt file at the top of the OpenMP project contains 66 the license text and associated patent grants. 67 </p> 68 69 <!--=====================================================================--> 70 <h2 id="dir-structure">Status</h2> 71 <!--=====================================================================--> 72 73 <p>With the release of Clang 3.8.0, OpenMP 3.1 support is enabled in 74 Clang by default, and the OpenMP runtime is therefore built as a 75 normal part of the Clang build, and distributed with the binary 76 distributions.You do not, therefore, need explicitly to check out this code, or 77 build it out of tree; a normal Clang check out and build will 78 automatically include building these runtime libraries. 79 </p> 80 81 <!--=====================================================================--> 82 <h2 id="goals">Features and Goals</h2> 83 <!--=====================================================================--> 84 85 <ul> 86 <li>Support for the <a href="https://www.openmp.org/wp-content/uploads/OpenMP3.1.pdf">OpenMP 87 3.1 standard (PDF)</a> has been achieved in the Clang 3.8.0 88 release. 89 </li> 90 91 <li>Support for the 92 <a href="https://www.openmp.org/wp-content/uploads/OpenMP4.0.0.pdf">OpenMP 93 4.0 standard (PDF)</a> and <a href="https://www.openmp.org/wp-content/uploads/openmp-4.5.pdf">OpenMP 94 4.5 standard (PDF)</a> is now being implemented. (Some OpenMP 4.0 95 and 4.5 features are already available). 96 <li>High performance.</li> 97 <li>ABI compatibility with <a href="https://gcc.gnu.org">Gcc</a> and 98 <a href="https://software.intel.com/en-us/compilers">Intel's 99 existing OpenMP compilers.</a> 100 We currently have binary compatibility with OpenMP 101 3.1 code compiled by gcc 4.9, however we do not have support 102 for OpenMP 4.0 code that uses task cancellation when compiled 103 by gcc 4.9. How we will support such code remains a research issue. 104 </li> 105 </ul> 106 107 <!--=====================================================================--> 108 <h2 id="why">Why have the runtime code here?</h2> 109 <!--=====================================================================--> 110 111 <p>It makes sense to have the runtime sources in the same place 112 (and with the same license) as the compiler. 113 </p> 114 115 <!--=====================================================================--> 116 <h2 id="requirements">Platform Support</h2> 117 <!--=====================================================================--> 118 119 <p>The runtime can be built with gcc, icc or clang. However, note 120 that a runtime built with clang cannot be guaranteed to work with 121 OpenMP code compiled by the other compilers, since clang does not support 122 a 128-bit float type, and cannot therefore generate the code used 123 for reductions of that type (which may occur in user code compiled 124 by the other compilers). 125 </p> 126 127 <p>The OpenMP runtime is known to work on 128 <ul> 129 <li>ARM® architecture processors</li> 130 <li>PowerPC™ processors</li> 131 <li>32 and 64 bit X86 132 processors when compiled with clang, with the Intel compiler 133 or with gcc, and also the Intel® Xeon Phi™ product family, when compiled with 134 the Intel compiler. 135 </li> 136 <li>MIPS and MIPS64</li> 137 <li>RISC-V 64-bit</li> 138 </ul> 139 Ports to other architectures and operating systems are welcome. 140 </p> 141 142 <p>A full OS and architecture compatibility matrix is in 143 <a href="README.txt">README.txt</a> 144 </p> 145 146 147 <!--=====================================================================--> 148 <h2>Get it and get involved!</h2> 149 <!--=====================================================================--> 150 151 <p>First please review our 152 <a href="https://llvm.org/docs/DeveloperPolicy.html">Developer's Policy</a>. 153 154 <p>To check out the code, use:</p> 155 156 <ul> 157 <li><code>git clone https://github.com/llvm/llvm-project.git</code></li> 158 </ul> 159 160 <p>In-tree build:</p> 161 <ul> 162 <li><code>cd llvm-project</code></li> 163 <li><code>mkdir build && cd build</code></li> 164 <li><code>cmake ../llvm -DLLVM_ENABLE_PROJECTS=openmp -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler></code></li> 165 <li><code>make omp</code></li> 166 </ul> 167 168 <p>Out-of-tree build:</p> 169 <ul> 170 <li><code>cd llvm-project</code></li> 171 <li><code>mkdir build-openmp && cd build-openmp</code></li> 172 <li><code>cmake ../openmp -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler></code></li> 173 <li><code>make</code></li> 174 </ul> 175 176 <p>Full details of how to build are in the 177 <a href="README.txt">README.txt</a> and README.rst in the source code repository. 178 </p> 179 180 <!--=====================================================================--> 181 <h3>Notes</h3> 182 <!--=====================================================================--> 183 184<p> 185 186</p> 187 188 <p>Send discussions to the 189 (<a href="https://lists.llvm.org/mailman/listinfo/openmp-dev">OpenMP mailing list</a>).</p> 190 191 192 <!--=====================================================================--> 193 <h2>Design Documents</h2> 194 <!--=====================================================================--> 195 196<ul> 197<li><a href="Reference.pdf">Runtime design (PDF)</a></li> 198</ul> 199 200 <!--=====================================================================--> 201 <h2>Copyright notices</h2> 202 <!--=====================================================================--> 203<ul> 204<li> 205 The OpenMP name and the OpenMP logo are registered trademarks of the 206 OpenMP Architecture Review Board. 207</li> 208<li> 209 Intel is a trademark of Intel Corporation in the U.S. and/or other 210 countries. 211</li> 212<li> 213 PowerPC is a trademark of IBM Corporation in the U.S. and/or other 214 countries. 215</li> 216<li> 217 ARM is a trademark of ARM Corporation in the U.S. and/or 218 other countries. 219</li> 220<li> 221 MIPS is a trademark of MIPS Computer Systems in the U.S. and/or 222 other countries. 223</li> 224</ul> 225</div> 226</body> 227</html> 228