now impossible to debug code that uses PETSc shared libraries?
Satish Balay
balay at mcs.anl.gov
Sat May 3 00:47:58 CDT 2008
On Fri, 2 May 2008, Barry Smith wrote:
> apple
Appears to work fine on 10.4 ppc machine - I have access to.
Satish
----------------------------------------------
[icrunch:ksp/examples/tutorials] petsc% ls $PETSC_DIR/$PETSC_ARCH/lib
foo/ libmpichf90.a libpetscdm.dylib libpetscsnes.dylib libpmpich.a
libfmpich.a libpetsc.dylib* libpetscksp.dylib libpetscts.dylib mpich2-ch3.pc
libmpich.a libpetsccontrib.dylib libpetscmat.dylib libpetscvec.dylib pkgconfig/
[icrunch:ksp/examples/tutorials] petsc% make ex2
/sandbox/petsc/petsc-dev/macosx-gnu/bin/mpicc -o ex2.o -c -fPIC -Wall -Wwrite-strings -Wno-long-double -Wno-strict-aliasing -g3 -I/sandbox/petsc/petsc-dev/src/dm/mesh/sieve -I/sandbox/petsc/petsc-dev -I/sandbox/petsc/petsc-dev/macosx-gnu/include -I/sandbox/petsc/petsc-dev/include -I/usr/X11R6/include -I/sandbox/petsc/petsc-dev/macosx-gnu/include -I. -I/sandbox/petsc/petsc-dev/macosx-gnu/include -I/sandbox/petsc/petsc-dev/macosx-gnu/include -D__SDIR__="src/ksp/ksp/examples/tutorials/" ex2.c
/sandbox/petsc/petsc-dev/macosx-gnu/bin/mpicc -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -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/sandbox/petsc/petsc-dev/macosx-gnu/lib -L/sandbox/petsc/petsc-dev/macosx-gnu/lib -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc -L/usr/X11R6/lib -lX11 /System/Library/Frameworks/vecLib.framework/vecLib -L/sandbox/petsc/petsc-dev/macosx-gnu/lib -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1 -ldl -lpmpich -lmpich -lSystemStubs -lSystem -lmpichf90 -lgfortranbegin -lgfortran -L/usr/local/gfortran/lib/gcc/powerpc-apple-darwin7.9.0/4.2.0 -L/usr/local/gfortran/lib -lgcc_s.10.4 -lmx -ldl -lpmpich -lmpich -lSystemStubs -lSystem -ldl
/usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
symbol _MPI_Comm_rank used from dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetsc.dylib(single module) not from earlier dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetscdm.dylib(single module)
symbol _MPI_Comm_size used from dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetsc.dylib(single module) not from earlier dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetscdm.dylib(single module)
symbol _MPI_Comm_size used from dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetsc.dylib(single module) not from earlier dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetscvec.dylib(single module)
symbol _MPI_Allreduce used from dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetsc.dylib(single module) not from earlier dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetscvec.dylib(single module)
symbol _MPI_Comm_compare used from dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetsc.dylib(single module) not from earlier dynamic library /sandbox/petsc/petsc-dev/macosx-gnu/lib/libpetscdm.dylib(single module)
/bin/rm -f ex2.o
[icrunch:ksp/examples/tutorials] petsc% gdb ex2
GNU gdb 6.1-20040303 (Apple version gdb-434) (Wed Nov 2 17:28:16 GMT 2005)
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 "powerpc-apple-darwin"...Reading symbols for shared libraries ............ done
(gdb) b MatMult
Breakpoint 1 at 0x1a9798: file matrix.c, line 1687.
(gdb) r
Starting program: /sandbox/petsc/petsc-dev/src/ksp/ksp/examples/tutorials/ex2
Reading symbols for shared libraries .++.+....+++++ done
Breakpoint 1 at 0x11b17c0: file matrix.c, line 1690.
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Breakpoint 1, MatMult (mat=0x200d130, x=0x2017d30, y=0x2018930) at matrix.c:1690
1690 PetscFunctionBegin;
(gdb) where
#0 MatMult (mat=0x200d130, x=0x2017d30, y=0x2018930) at matrix.c:1690
#1 0x00002ff8 in main (argc=1, args=0xbffff8a8) 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