Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 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="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 Lattner | 856c732 | 2015-08-05 04:04:09 +0000 | [diff] [blame] | 25 | <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 Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 27 | <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 Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 35 | <h1>OpenMP®: Support for the OpenMP language</h1> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 36 | <!--*********************************************************************--> |
| 37 | |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 38 | <p>The OpenMP subproject of LLVM contains the |
| 39 | components required to build an executable OpenMP program that are |
Andrey Churbanov | e3ebce6 | 2015-05-13 13:42:59 +0000 | [diff] [blame] | 40 | outside the compiler itself. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 41 | </p> |
| 42 | |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 43 | <p>Here you can find :- |
| 44 | <ul> |
| 45 | <li> |
| 46 | the code for the runtime library against which |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 47 | code compiled by <tt>clang -fopenmp</tt> must be linked before it |
| 48 | can run. |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 49 | </li> |
| 50 | <li> |
| 51 | the library that supports offload to target devices (in |
| 52 | "offload") |
| 53 | </li> |
| 54 | <li> |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 55 | the OpenUH test-suite used to validate the OpenMP runtime |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 56 | </li> |
| 57 | </ul> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 58 | </p> |
| 59 | |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 60 | <p>Support for the parts of the OpenMP 4.0 (and later) language that are not |
Jim Cownie | 33f7b24 | 2014-04-09 15:40:23 +0000 | [diff] [blame] | 61 | 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 Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 65 | and data to attached computational devices such as |
| 66 | the Intel® Xeon Phi™ coprocessor or GPUs. |
| 67 | The README.txt in the "offload" |
Jim Cownie | 33f7b24 | 2014-04-09 15:40:23 +0000 | [diff] [blame] | 68 | directory describes how to build the offload library. |
| 69 | </p> |
| 70 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 71 | <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 Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 79 | <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 Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 91 | <h2 id="goals">Features and Goals</h2> |
| 92 | <!--=====================================================================--> |
| 93 | |
| 94 | <ul> |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 95 | <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 Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 105 | <li>High performance.</li> |
Jim Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 106 | <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 Peyton | 924a662 | 2016-05-17 20:48:42 +0000 | [diff] [blame] | 108 | existing OpenMP compilers.</a> |
Jonathan Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 109 | We currently have binary compatibility with OpenMP |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 110 | 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 Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 113 | </li> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 114 | </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 Peyton | b5969ca | 2016-03-18 14:50:01 +0000 | [diff] [blame] | 128 | <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 Peyton | 924a662 | 2016-05-17 20:48:42 +0000 | [diff] [blame] | 136 | <p>The OpenMP runtime is known to work on |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 137 | <ul> |
| 138 | <li>ARM® architecture processors</li> |
| 139 | <li>PowerPC™ 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® Xeon Phi™ product family, when compiled with |
| 143 | the Intel compiler. |
| 144 | </li> |
Sylvestre Ledru | cd9d374 | 2016-12-08 09:22:24 +0000 | [diff] [blame] | 145 | <li>MIPS and MIPS64</li> |
Jim Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 146 | </ul> |
| 147 | Ports to other architectures and operating systems are welcome. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 148 | </p> |
Jonathan Peyton | 924a662 | 2016-05-17 20:48:42 +0000 | [diff] [blame] | 149 | |
| 150 | <p>A full OS and archiecture compatibility matrix is in |
Jim Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 151 | <a href="README.txt">README.txt</a> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 152 | </p> |
| 153 | |
| 154 | |
| 155 | <!--=====================================================================--> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 156 | <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 Peyton | 8977618 | 2015-09-14 17:20:30 +0000 | [diff] [blame] | 169 | Note that for an in-tree build, you should check out openmp to llvm/projects. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 170 | </p> |
Jonathan Peyton | 8977618 | 2015-09-14 17:20:30 +0000 | [diff] [blame] | 171 | |
| 172 | <p>In-tree build:</p> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 173 | <ul> |
Jonathan Peyton | 8977618 | 2015-09-14 17:20:30 +0000 | [diff] [blame] | 174 | <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 && cd build</code></li> |
| 178 | <li><code>cmake path/to/llvm -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler></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 Hahnfeld | 3e921d3 | 2017-11-29 19:31:43 +0000 | [diff] [blame] | 186 | <li><code>cd where-you-want-to-live/openmp</code></li> |
Jonathan Peyton | 8977618 | 2015-09-14 17:20:30 +0000 | [diff] [blame] | 187 | <li><code>mkdir build && cd build</code></li> |
| 188 | <li><code>cmake path/to/openmp -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler></code></li> |
| 189 | <li><code>make</code></li> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 190 | </ul> |
Jonathan Peyton | 924a662 | 2016-05-17 20:48:42 +0000 | [diff] [blame] | 191 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 192 | <p>Full details of how to build are in the |
Jonas Hahnfeld | 2e809ac | 2017-12-27 09:15:10 +0000 | [diff] [blame] | 193 | <a href="README.txt">README.txt</a> and README.rst in the source code repository. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 194 | </p> |
| 195 | |
| 196 | <!--=====================================================================--> |
| 197 | <h3>Notes</h3> |
| 198 | <!--=====================================================================--> |
| 199 | |
| 200 | <p> |
| 201 | |
| 202 | </p> |
| 203 | |
| 204 | <p>Send discussions to the |
Tanya Lattner | 856c732 | 2015-08-05 04:04:09 +0000 | [diff] [blame] | 205 | (<a href="http://lists.llvm.org/mailman/listinfo/openmp-dev">OpenMP mailing list</a>).</p> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 206 | |
| 207 | |
| 208 | <!--=====================================================================--> |
| 209 | <h2>Design Documents</h2> |
| 210 | <!--=====================================================================--> |
| 211 | |
| 212 | <ul> |
Jim Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 213 | <li><a href="Reference.pdf">Runtime design (PDF)</a></li> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 214 | </ul> |
| 215 | |
Jim Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 216 | <!--=====================================================================--> |
| 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 Cownie | 4cc4bb4 | 2014-10-07 16:25:50 +0000 | [diff] [blame] | 228 | <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 Ledru | cd9d374 | 2016-12-08 09:22:24 +0000 | [diff] [blame] | 236 | <li> |
| 237 | MIPS is a trademark of MIPS Computer Systems in the U.S. and/or |
| 238 | other countries. |
| 239 | </li> |
Jim Cownie | 885d7fa | 2013-10-03 11:55:28 +0000 | [diff] [blame] | 240 | </ul> |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 241 | </div> |
| 242 | </body> |
| 243 | </html> |