-
Notifications
You must be signed in to change notification settings - Fork 283
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
Wrong openmp flag when using clang compiler #30
Comments
On Mon, 14 Jan 2013, David Andrs wrote:
We're using ax_openmp.m4 from the autoconf archive, which does try |
On Mon, Jan 14, 2013 at 3:22 PM, David Andrs notifications@github.comwrote:
I can take a look at this... it appears that because the AX_OPENMP script ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none" And clang doesn't return 1 (it only warns) if it sees -fopenmp, that Easy fix: we could change the order in which the flags are tested, of More complicated: we could re-order the options based on knowing what the Even more complicated: we could actually try to parse more detailed output John |
Hmm. Tried it again today and I think I was wrong with the -openmp flag. If I use this switch, I do not get any error. However clang will interpret this switch as "-o penmp" and produces a file called penmp - which I did not notice before. Compiling from a command line with -fopenmp does not throw any warnings on my simple test C and C++ files. Thus, I am not quite sure why the libmesh build produces that " clang++: warning: argument unused during compilation: '-fopenmp' "... Feel free to mark this issue as wontfix or invalid unless you guys want to look at source of that unused flag warning... |
On Jan 15, 2013, at 9:42 AM, David Andrs notifications@github.com wrote:
The way I interpret that is that the argument was truly unused - e.g. the underlying file that was compiled had no OpenMP pragmas? What happens if you try ./configure libmesh_CXXFLAGS="-Qunused-arguments" libmesh_CFLAGS="-Qunused-arguments" ? -Ben |
On Tue, Jan 15, 2013 at 8:42 AM, David Andrs notifications@github.comwrote:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/054459.html Do you like the idea of adding -Qunused-arguments in compiler.m4 for all John |
On Tue, Jan 15, 2013 at 8:54 AM, John Peterson jwpeterson@gmail.com wrote:
Where by "bug" I mean "unsupported feature". I think David's clang i.e. prior to the discussion cited above.
If there's any desire for this, I will take a crack at adding it. John |
On Tue, Jan 15, 2013 at 8:46 AM, Benjamin S. Kirk
David |
Resurrecting... John, I have no problem adding -Qunused-arguments Looks like it is understood at least as far back as 2.8. |
Can someone who uses clang double-check that this works? Addresses Issue #30
Using a clang compiler (3.1), ./configure script adds -fopenmp info CXXFLAGS and CFLAGS. It should be -openmp.
The text was updated successfully, but these errors were encountered: