now impossible to debug code that uses PETSc shared libraries?

Barry Smith bsmith at mcs.anl.gov
Sat May 3 14:50:46 CDT 2008


   They may have changed things on Leopard.

   Barry

On May 3, 2008, at 2:00 AM, Satish Balay wrote:

> On Sat, 3 May 2008, Satish Balay wrote:
>
>> On Fri, 2 May 2008, Barry Smith wrote:
>>
>>> apple
>>
>> Appears to work fine on 10.4 ppc machine - I have access to.
>
> Also works on 10.4 Intel machine
>
> Satish
>
> --------------------------------------------
>
> videh:~/petsc-dev/src/ksp/ksp/examples/tutorials balay$ ls  
> $PETSC_DIR/$PETSC_ARCH/lib
> foo                     libpetsc.dylib           
> libpetscdm.dylib        libpetscmat.dylib       libpetscts.dylib
> libmpiuni.a             libpetsccontrib.dylib    
> libpetscksp.dylib       libpetscsnes.dylib      libpetscvec.dylib
> videh:~/petsc-dev/src/ksp/ksp/examples/tutorials balay$ make ex2
> gcc -o ex2.o -c -fPIC -Wall -Wwrite-strings -Wno-long-double -Wno- 
> strict-aliasing -g3 -I/Users/balay/petsc-dev/src/dm/mesh/sieve -I/ 
> Users/balay/petsc-dev -I/Users/balay/petsc-dev/darwin8.11.1-c-debug/ 
> include -I/Users/balay/petsc-dev/include -I/Developer/SDKs/ 
> MacOSX10.4u.sdk/usr/X11R6/include -I/Users/balay/petsc-dev/include/ 
> mpiuni -D__SDIR__="src/ksp/ksp/examples/tutorials/" ex2.c
> gcc -Wl,-multiply_defined,suppress -Wl,-multiply_defined - 
> Wl,suppress  -fPIC -Wall -Wwrite-strings -Wno-long-double -Wno- 
> strict-aliasing -g3  -o ex2 ex2.o  -L/Users/balay/petsc-dev/ 
> darwin8.11.1-c-debug/lib -L/Users/balay/petsc-dev/darwin8.11.1-c- 
> debug/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc    -L/ 
> usr/X11R6/lib -lX11  -L/Users/balay/petsc-dev/darwin8.11.1-c-debug/ 
> lib -L/Users/balay/petsc-dev/darwin8.11.1-c-debug/lib -lmpiuni - 
> llapack -lblas
> /bin/rm -f ex2.o
> videh:~/petsc-dev/src/ksp/ksp/examples/tutorials balay$ gdb ex2
> GNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 20 15:50:43  
> GMT 2006)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and  
> you are
> welcome to change it and/or distribute copies of it under certain  
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for  
> details.
> This GDB was configured as "i386-apple-darwin"...Reading symbols for  
> shared libraries .......... done
>
> (gdb) b MatMult
> Breakpoint 1 at 0x184cfe: file matrix.c, line 1687.
> (gdb) r
> Starting program: /Users/balay/petsc-dev/src/ksp/ksp/examples/ 
> tutorials/ex2
> Reading symbols for shared libraries ..+.+++++ done
> Breakpoint 1 at 0x118cd0c: file matrix.c, line 1690.
>
> Breakpoint 1, MatMult (mat=0x1808f30, x=0x180b930, y=0x180fb30) at  
> matrix.c:1690
> 1690      PetscFunctionBegin;
> (gdb) where
> #0  MatMult (mat=0x1808f30, x=0x180b930, y=0x180fb30) at matrix.c:1690
> #1  0x00002746 in main (argc=1, args=0xbffffae0) at ex2.c:141
> (gdb) list
> 1685    @*/
> 1686    PetscErrorCode PETSCMAT_DLLEXPORT MatMult(Mat mat,Vec x,Vec y)
> 1687    {
> 1688      PetscErrorCode ierr;
> 1689
> 1690      PetscFunctionBegin;
> 1691      PetscValidHeaderSpecific(mat,MAT_COOKIE,1);
> 1692      PetscValidType(mat,1);
> 1693      PetscValidHeaderSpecific(x,VEC_COOKIE,2);
> 1694      PetscValidHeaderSpecific(y,VEC_COOKIE,3);
> (gdb)
>




More information about the petsc-dev mailing list