-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for clang 3.7 w/ openmp backend #393
Comments
Are you sure its full OpenMP 3.1 support? |
The website says OpenMP 3.1 is only in Clang 3.8 |
I've compiled and used Kokkos with OpenMP and Clang 3.7 without any issues. On the OpenMP website, they claim OpenMP 3.1 will be added with Clang 3.7 (http://openmp.org/wp/2015/08/clang-37-will-have-full-openmp-31-support/). The release notes for Clang 3.7 says it has full OpenMP 3.1 support as well (http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html#openmp-support). |
I've been using the macports clang-3.7 with OpenMP for over 6 months without any problems. |
Might be 3.8 actually. |
Tested with 3.9.0 and head, addresses #393
This works now (at least with 3.9.0). Note: the SEMS module was not build with the openmp runtime library. So it will fail to link executables. |
@crtrott How does one enable the clang/openmp build? I looked at the code and docs and tried the following. |
You don't have to do anything. You just need a version of Clang installed which has OpenMP enabled and the LLVM OpenMP runtime installed as well. After that our GNU build at least does all the right things. If you want to do it through Trilinos you need to add: -fopenmp=libomp as you said (you don't need the version thingy). My guess would be that your clang install doesn't actually have the llvm openmp runtime installed (it is an optional thing at least all the way to LLVM/Clang3.9). |
So, have you built w/ SEMS modules?
…On Thu, Feb 16, 2017 at 8:57 AM, Christian Trott ***@***.***> wrote:
You don't have to do anything. You just need a version of Clang installed
which has OpenMP enabled and the LLVM OpenMP runtime installed as well.
After that our GNU build at least does all the right things. If you want to
do it through Trilinos you need to add: -fopenmp=libomp as you said (you
don't need the version thingy). My guess would be that your clang install
doesn't actually have the llvm openmp runtime installed (it is an optional
thing at least all the way to LLVM/Clang3.9).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#393 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AOPDIC_ortVKTe1CzLsk70iwNQez78OIks5rdHH4gaJpZM4Jhsnk>
.
|
Oh yeah I should have mentioned that: the SEMS modules did not install OpenMP support in LLVM .... |
Clang 3.7 supports OpenMP, but it requires a special build as Christian mentioned. Clang 3.8 and above support OpenMP in the normal builds. As far as I know, Clang expects the same flag as GCC to enable OpenMP (-fopenmp). That's what's always worked for me. |
Greg, no this is not fully correct. Clang 3.8 and above support OpenMP by default, but they don't actually build the runtime for OpenMP by default. So a default build of Clang will not work for OpenMP without some complicated explicitly added include and link stuff in order to link against the intel OpenMP runtime and find the header files for OpenMP (not sure if it works with the GNU runtime). You can verify this with the sems-clang modules. |
It does not appear that the SEMS tool has clang installed.
find $SEMS_CLANG_ROOT -name omp.h
dir-tmp (gcc) 4 $
…On Thu, Feb 16, 2017 at 11:54 AM, Christian Trott ***@***.***> wrote:
Greg, no this is not fully correct. Clang 3.8 and above support OpenMP by
default, but they don't actually build the runtime for OpenMP by default.
So a default build of Clang will not work for OpenMP without some
complicated explicitly added include and link stuff in order to link
against the intel OpenMP runtime and find the header files for OpenMP (not
sure if it works with the GNU runtime). You can verify this with the
sems-clang modules.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#393 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AOPDIBCVpM3fs0pEZi2lqVKquxnEPwXmks5rdJt-gaJpZM4Jhsnk>
.
|
Clang 3.7 and above support openmp. Please add support for building and testing with clang 3.7 or newer.
The text was updated successfully, but these errors were encountered: