Comments (8)
On Mon, 14 Jan 2013, David Andrs wrote:
Using a clang compiler (3.1), ./configure script adds -fopenmp info CXXFLAGS and CFLAGS. It
should be -openmp.
We're using ax_openmp.m4 from the autoconf archive, which does try
-fopenmp before trying -openmp. My clang++ 3.0 seems to be happy with
either (at least it doesn't emit "argument unused during compilation"
warnings like it does with -thiswontwork)... if clang 3.1 is getting
more picky about its options, I'm not sure how to easily modify that
m4 file, which seems to assume that compilers will return errors upon
seeing unknown options, not just warnings.
from libmesh.
On Mon, Jan 14, 2013 at 3:22 PM, David Andrs [email protected]:
Using a clang compiler (3.1), ./configure script adds -fopenmp info
CXXFLAGS and CFLAGS. It should be -openmp.
I can take a look at this... it appears that because the AX_OPENMP script
tries the options in the following order:
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
configure thinks it succeeds.
Easy fix: we could change the order in which the flags are tested, of
course this might break another compiler in the same manner.
More complicated: we could re-order the options based on knowing what the
compiler is. Seems to be a way of doing this through the
$OPENMP_[]_AC_LANG_PREFIX[]FLAGS variable (though I don't understand this
syntax).
Even more complicated: we could actually try to parse more detailed output
from the compiler (and look for warnings) but I don't know how to do that
in autoconf...
John
from libmesh.
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...
from libmesh.
On Jan 15, 2013, at 9:42 AM, David Andrs [email protected] wrote:
" clang++: warning: argument unused during compilation: '-fopenmp'
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
from libmesh.
On Tue, Jan 15, 2013 at 8:42 AM, David Andrs [email protected]:
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...Looks like this may have been a compiler bug. Here it was discussed in
October 2012:
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
clang builds?
John
from libmesh.
On Tue, Jan 15, 2013 at 8:54 AM, John Peterson [email protected] wrote:
On Tue, Jan 15, 2013 at 8:42 AM, David Andrs [email protected]
wrote: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...Looks like this may have been a compiler bug. Here it was discussed in
October 2012:http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-October/054459.html
Where by "bug" I mean "unsupported feature". I think David's clang
(3.1) was released 22 May 2012
i.e. prior to the discussion cited above.
Do you like the idea of adding -Qunused-arguments in compiler.m4 for all
clang builds?
If there's any desire for this, I will take a crack at adding it.
John
from libmesh.
On Tue, Jan 15, 2013 at 8:46 AM, Benjamin S. Kirk
[email protected]:
On Jan 15, 2013, at 9:42 AM, David Andrs [email protected]
wrote:" clang++: warning: argument unused during compilation: '-fopenmp'
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"This works, i.e. no warnings generated during the build.
?
-Ben
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/30#issuecomment-12273218.
David
from libmesh.
Resurrecting... John, I have no problem adding -Qunused-arguments
Looks like it is understood at least as far back as 2.8.
from libmesh.
Related Issues (20)
- FE pre-requests for error estimation HOT 3
- Create is_hierarchic shim in FEInterface
- Support repair of mixed-order meshes in `UnstructuredMesh::all_second_order()` HOT 1
- When is the next release ? HOT 3
- Hardcoded /usr/include/tirpc path HOT 3
- Enhance MeshFunction to handle vector variables
- Assessment of the difficulty in porting CPU architecture for libmesh HOT 1
- Uniform serial data access to vector and tensor types HOT 2
- Enabling threaded print of element information HOT 1
- Abaqus mesh reading new error
- Incorrect VTK configuration flag suggested by configure HOT 7
- Installation with mac M1 HOT 8
- Support mixed-order meshes in `find_neighbors()`, `stitch_meshes()` HOT 1
- Spurious -I/usr/include/tirpc is added when autodetecting libtirpc in linker path
- Refactor HDG NS example to use FEMContext
- VTK output then read loses block id information HOT 5
- MatSetValues_MPIAIJ() triggers malloc error at line 565 during libMesh termination HOT 6
- Installation error due to petsc compatibility HOT 12
- constrain_element_matrix changes the col_dofs vector size HOT 3
- Investigating the possibility of only having one solution vector in systems HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmesh.