On Sat, 24 Mar 2012, Jungho Lee wrote:
In that case the solution is mostly likely going to come from the
compiler developer. Even the most horribly broken source code isn't
supposed to crash the compiler.
Maybe, but I've heard this happening with PETSc with people using
different types of fortran compilers. I'm not saying clang is perfect
but maybe try compiling with pedantic flags to iron out some
compatibility issues.
We're already on it. "-pedantic" gets used by default in debug mode
on gcc, and gets tested regularly on gcc 4.5, irregularly on gcc 4.6
and others.
I don't think this one's a libMesh bug either, because there's
something sticking a *bunch* of extra non-libMesh-related flags in
your compile command line right around that O2:
That command line I pasted was mostly flags from the compiler. Why
send -O2 at all with the METHOD=dbg option?
We don't:
roystgnr@mycroft:~/libmesh/svn$ METHOD=dbg make echo | grep O2
roystgnr@mycroft:~/libmesh/svn$
But neither do we prevent you from making exceptions, e.g.:
roystgnr@mycroft:~/libmesh/svn$ CFLAGS='-O2' METHOD=dbg make echo |
grep O2
-g -Wimplicit -fPIC -O2
In fact, why does METHOD=dbg even need to be provided?
Because we default to METHOD=opt. No doubt if we defaulted to
METHOD=dbg then we'd get complaints like "why does METHOD=opt even
need to be provided?"
I find it frustrating that there is a ./configure command as well as
environment variables to tweak just to get a debug library built.
I find "./configure && make && METHOD=dbg make" fairly convenient, but
there may be some bug with clang that's not getting triggered with
icc, gcc, or even the Portland Group stuff I've used lately. If
clang does need its own special snowflake options too I'd like to
figure out what they are so we can add a entry to m4/compiler.m4
accordingly.
$ cat Make.common | grep O2
libmesh_FFLAGS = -g @O2
libmesh_CXXFLAGS := -g -O2 $(libmesh_CXXFLAGS)
libmesh_CFLAGS := -g -O2 $(libmesh_CFLAGS)
libmesh_CXXFLAGS := -g -O2 $(libmesh_CXXFLAGS)
libmesh_CFLAGS := -g -O2 $(libmesh_CFLAGS)
libmesh_CXXFLAGS := -g -O2 -pg $(libmesh_CXXFLAGS)
libmesh_CFLAGS := -g -O2 -pg $(libmesh_CFLAGS)
libmesh_CXXFLAGS := -g -O2 -g -fno-omit-frame-pointer $(libmesh_CXXFLAGS)
libmesh_CFLAGS := -g -O2 -g -fno-omit-frame-pointer $(libmesh_CFLAGS)
Four O2 C/CXXFLAGS sets sounds right; one for each of devel, prof,
oprof, and opt modes. Are any of those on dbg mode for you?
roystgnr@mycroft:~/libmesh/svn$ METHOD=dbg make echo | grep --after-context=1
'C.*FLAGS'
libmesh_CPPFLAGS:
-DDEBUG -DPETSC_USE_DYNAMIC_LIBRARIES
--
libmesh_CFLAGS:
-g -Wimplicit -fPIC
--
libmesh_CXXFLAGS:
-O0 -felide-constructors -g -ansi -pedantic -W -Wall -Wextra -Wno-long-long
-Wunused -Wpointer-arith -Wformat -Wparentheses -fPIC -Woverloaded-virtual
-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
Something scarfed from your PETSc configuration, perhaps?
No, just internal compiler flags. You try compiling any source file
with a -v argument and tell me how many flags you see.
Ah - I didn't realize you'd told it to spit out the internal lines as
well.
What's the command line option set look like? Is -O2 in the output
you see with "METHOD=dbg make -n"? With "METHOD=dbg make echo"?
---
Roy
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users