[petsc-users] Release of petsc-3.4

Jed Brown jedbrown at mcs.anl.gov
Tue May 14 15:34:12 CDT 2013


Michael Povolotskyi <mpovolot at purdue.edu> writes:

> Thank you for the info.
> What is exactly "better encapsulation and better control of symbols"?

Headers are more precise (leading to fewer, faster recompiles) and fewer
internal details leak out.  For example, the contents of PetscObject and
Vec are no longer exposed (to be accessed indirectly via inlines or
macros, for example) which allows us to upgrade that structure without
breaking binary compatibility.

One practical consequence of this is that you can use LD_PRELOAD to run
optimized code against a debugging PETSc without recompiling.  That is,
compile your application (and intermediate libraries, if applicable)
against an optimized PETSC_ARCH.  Then make a debugging PETSC_ARCH that
is otherwise identical:

  $ cd $PETSC_DIR
  $ $PETSC_ARCH/conf/reconfigure*.py --with-debugging=1 PETSC_ARCH=${PETSC_ARCH}-dbg
  $ make PETSC_ARCH=${PETSC_ARCH}-dbg

Now, without rebuilding anything, this gives you the usual debugging
diagnostics (input validation, stack debugging, etc.):

  $ cd ~/your-project
  $ LD_PRELOAD=$PETSC_DIR/${PETSC_ARCH}-dbg/lib/libpetsc.so yourapp -options


More information about the petsc-users mailing list