The problem is that the compiler crashes as seen below. I can compile
this individual compile if I use the flag -O0 but I am perplexed as to
why this is trying to use -O2 even though I specified METHOD=dbg. For
reference, my mpicc/mpicxx does not have any optimization flag:

$ mpicxx -show
clang++ -pipe -w -g -arch x86_64 -L/opt/local/lib
-I/opt/local/include/mpich2 -L/opt/local/lib -lmpichcxx -lpmpich
-lmpich -lopa -lmpl -lpthread

$ make METHOD=dbg
Compiling C++ (in debug mode) src/fe/fe_monomial_shape_2D.C...
0  clang             0x0000000105406472 _ZL15PrintStackTracePv + 34
1  clang             0x00000001054068f9 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff8915bcfa _sigtramp + 26
3  libsystem_c.dylib 0x00007fff89124a50 szone_malloc_should_clear + 3741
4  clang             0x0000000104786060
llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) + 48
5  clang             0x0000000104785892
llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 66
6  clang             0x00000001047857c8
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 40
7  clang             0x00000001046b3291
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) +
2417
8  clang             0x00000001046ae4d5
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) +
789
9  clang             0x00000001046ae1ae
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 110
10 clang             0x00000001046a32b2
llvm::FPPassManager::runOnFunction(llvm::Function&) + 322
11 clang             0x00000001046a87bb
llvm::FPPassManager::runOnModule(llvm::Module&) + 155
12 clang             0x00000001046a3bc1
llvm::MPPassManager::runOnModule(llvm::Module&) + 289
13 clang             0x00000001046a35c5
llvm::PassManagerImpl::run(llvm::Module&) + 277
14 clang             0x00000001046a34ad
llvm::PassManager::run(llvm::Module&) + 13
15 clang             0x000000010468213c
clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 4508
16 clang             0x000000010467f941
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) +
513
17 clang             0x000000010454b3f6 clang::ParseAST(clang::Sema&,
bool) + 406
18 clang             0x0000000104549ed7
clang::CodeGenAction::ExecuteAction() + 855
19 clang             0x000000010451c43f
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
20 clang             0x000000010451b0cb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
21 clang             0x000000010450d8ce cc1_main(char const**, char
const**, char const*, void*) + 5086
22 clang             0x00000001044e80d8 main + 648
23 clang             0x00000001044e7e44 start + 52
24 clang             0x000000000000007e start + 18446744069342331502
Stack dump:
0.      Program arguments: /usr/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.3 -emit-obj -disable-free
-disable-llvm-verifier -main-file-name fe_monomial_shape_2D.C
-pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 128.2 -g
-coverage-file src/fe/fe_monomial_shape_2D.x86_64-apple-darwin11.3.0.dbg.o
-resource-dir /usr/bin/../lib/clang/3.1 -D DEBUG -D
PETSC_USE_DYNAMIC_LIBRARIES -I /include/boost-0 -I
/Users/jungholee/projects/herd/libmesh/include/base -I
/Users/jungholee/projects/herd/libmesh/include/enums -I
/Users/jungholee/projects/herd/libmesh/include/error_estimation -I
/Users/jungholee/projects/herd/libmesh/include/fe -I
/Users/jungholee/projects/herd/libmesh/include/geom -I
/Users/jungholee/projects/herd/libmesh/include/mesh -I
/Users/jungholee/projects/herd/libmesh/include/numerics -I
/Users/jungholee/projects/herd/libmesh/include/parallel -I
/Users/jungholee/projects/herd/libmesh/include/partitioning -I
/Users/jungholee/projects/herd/libmesh/include/physics -I
/Users/jungholee/projects/herd/libmesh/include/quadrature -I
/Users/jungholee/projects/herd/libmesh/include/reduced_basis -I
/Users/jungholee/projects/herd/libmesh/include/solvers -I
/Users/jungholee/projects/herd/libmesh/include/systems -I
/Users/jungholee/projects/herd/libmesh/include/utils -I
/Users/jungholee/projects/herd/libmesh/contrib/laspack -I
/Users/jungholee/projects/herd/libmesh/contrib/parmetis/Lib -I
/Users/jungholee/projects/herd/libmesh/contrib/metis/Lib -I
/Users/jungholee/projects/herd/libmesh/contrib/sfcurves -I
/Users/jungholee/projects/herd/libmesh/contrib/gzstream -I
/Users/jungholee/projects/herd/libmesh/contrib/gmv -I
/Users/jungholee/projects/herd/libmesh/contrib/tetgen -I
/Users/jungholee/projects/herd/libmesh/contrib/triangle -I
/Users/jungholee/projects/herd/libmesh/contrib/exodusii/Lib/include -I
/Users/jungholee/projects/herd/libmesh/contrib/netcdf/Lib -I
/Users/jungholee/projects/herd/libmesh/contrib/nemesis/Lib -I
/Users/jungholee/projects/herd/libmesh/contrib/libHilbert/include -I
/Users/jungholee/projects/herd/libmesh/contrib/fparser -I
/Users/jungholee/projects/petsc-dev/include -I
/Users/jungholee/projects/petsc-dev/bmake/arch-c -I
/Users/jungholee/projects/petsc-dev/arch-c/include -I
/opt/local/include -I /opt/local/include -I /opt/local/include/mpich2
-I /opt/local/include/mpich2 -fmodule-cache-path
/var/folders/r1/v4j3z5c939q3_w__0q67d7fm0000gn/T/clang-module-cache
-O2 -w -fdeprecated-macro -fdebug-compilation-dir
/Users/jungholee/projects/herd/libmesh -ferror-limit 19
-fmessage-length 118 -stack-protector 1 -fblocks
-fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-dispatch-method=mixed -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
src/fe/fe_monomial_shape_2D.x86_64-apple-darwin11.3.0.dbg.o -x c++
src/fe/fe_monomial_shape_2D.C
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'src/fe/fe_monomial_shape_2D.C'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_ZN7libMesh2FEILj2ELN12libMeshEnums8FEFamilyE2EE5shapeENS1_8ElemTypeENS1_5OrderEjRKNS_5PointE'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to
see invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://developer.apple.com/bugreporter/ and include command line
arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg:
/var/folders/r1/v4j3z5c939q3_w__0q67d7fm0000gn/T/fe_monomial_shape_2D-9cY1fE.ii
clang: note: diagnostic msg:
/var/folders/r1/v4j3z5c939q3_w__0q67d7fm0000gn/T/fe_monomial_shape_2D-9cY1fE.sh
make: *** [src/fe/fe_monomial_shape_2D.x86_64-apple-darwin11.3.0.dbg.o]
Error 254

On Fri, Mar 23, 2012 at 1:57 PM, Roy Stogner <[email protected]> wrote:
>
> On Fri, 23 Mar 2012, Jungho Lee wrote:
>
>> That made the make go past that file, but it barfed at
>> src/fe/fe_monomial_shape_2D.C.
>
>
> More details?
> ---
> 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

Reply via email to