[mpich-discuss] Cannot compile with debugging symbols

Dave Goodell goodell at mcs.anl.gov
Tue Aug 30 11:21:45 CDT 2011


I recommend dropping the "--enable-debuginfo" option and adding the "--enable-g=dbg" option instead.  If you don't specifically know that you need the special debugging functionality then you don't need it.

-Dave

On Aug 30, 2011, at 11:12 AM CDT, Matthew Russell wrote:

> Hmm, to be honest, I've never debugged a program using MPI, so I'm not completely sure what I need.  For a seg. fault. what would you suspect I need?  The model runs on one processor without problems right now.
> 
> For your latter comment, I suspect you're right.  Right now I'm working on building MPICH and the models I need to run with GNU compilers.
> 
> Thanks.
> 
> On Tue, Aug 30, 2011 at 12:09 PM, Dave Goodell <goodell at mcs.anl.gov> wrote:
> Do you just need debugging symbols or do you also need support for locating MPI processes and viewing MPI message queues with the Totalview debugger?  Your configure options are asking for the additional MPI message queue debugging.  If you simply need to be able to see debugging symbols in your debugger then you can configure instead with "--enable-g=dbg" or "CFLAGS=-g".
> 
> Otherwise if you do need support for the special MPI debugging hooks then you'll need to build MPICH2 with gcc or some compiler that is capable of building shared libraries.
> 
> -Dave
> 
> On Aug 30, 2011, at 10:27 AM CDT, Matthew Russell wrote:
> 
> > Hi,
> >
> > I'm having problems building MPICH2 with debugging symbols.  I'm using OS X Lion on an 86x64 box using PGI 10.9 as my compiler.
> >
> > As far as I can tell, the issue is that the builder wants me to use the flag -fpic to produce position independent code, but PGI doesn't support the -fpic flag for OS X on a 64 bit machine.
> >
> > My problem is with ./src/mpi/debugger/dll_mpich2.c, specifically, here is the line the fails while i'm make'ing it.
> >
> > /opt/pgi/osx86-64/10.9/bin/pgcc -fPIC -DHAVE_CONFIG_H -I. -I. -I../../include -I../../../src/include -O2 -Msignextend -V   -g  -DNDEBUG -DpgiFortran  -I/Users/matt/software/mpich2/mpich2-1.4/src/mpl/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpl/include -I/Users/matt/software/mpich2/mpich2-1.4/src/openpa/src -I/Users/matt/software/mpich2/mpich2-1.4/src/openpa/src -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/common/datatype -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/common/datatype -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/common/locks -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/common/locks -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/n
>  emesis/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/nemesis/include -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/nemesis/utils/monitor -I/Users/matt/software/mpich2/mpich2-1.4/src/mpid/ch3/channels/nemesis/nemesis/utils/monitor -I/Users/matt/software/mpich2/mpich2-1.4/src/util/wrappers -I/Users/matt/software/mpich2/mpich2-1.4/src/util/wrappers -g -c ./dll_mpich2.c -o _sdll_mpich2.o
> > pgcc-Error-Unknown switch: -fPIC
> >
> > pgcc 10.9-0 64-bit target on Apple OS/X -tp nehalem-64
> > Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
> > Copyright 2000-2010, STMicroelectronics, Inc.  All Rights Reserved.
> > make[2]: *** [dll_mpich2.lo] Error 1
> > make[1]: *** [all-postamble] Error 2
> > make: *** [all-redirect] Error 2
> >
> > My configuration options were:
> >
> > ./configure --prefix=/usr/local/mpich2_pg-dbg --enable-f77 --enable-debuginfo --enable-error-messages=all --enable-g=all --enable-fast=none
> >
> >
> > Does any one know how I can get around this?  I need the debug info, since the program I'm trying to run with MPICH (CMAQ) seg. faults. right away, and I don't know how else to debug it.
> >
> > Note, with my installation (without debugging symbols), I can run all the sample programs on multiple processors, etc.
> >
> > Thanks,
> > _______________________________________________
> > mpich-discuss mailing list
> > mpich-discuss at mcs.anl.gov
> > https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list