[petsc-users] Missing symbols in libpetscts.h

Jed Brown jed at 59A2.org
Fri Jul 23 08:59:08 CDT 2010


On Fri, 23 Jul 2010 08:47:39 -0400, Filippo Spiga <filippo.spiga at disco.unimib.it> wrote:
>   Dear Satish,
>      thanks for you reply.  Anyway not in all case the libpetscts.{a, 
> so} is compiled. Is there a specific option of the configure that build 
> this specific PETSc library? It is also possible that I miss something 
> else or my environment is not "clean"....

PETSc 3.1 uses a single library by default, so you have to link libpetsc
(e.g. -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc).  If you want separate
libraries for each of the components, you can configure
--with-single-library=0.  Note that in this case there is no
libpetsc.so, but there is a libpetscsys.so.  If you use this option, you
will have to link all the components up to the level you are actually
using.

Jed

Note: there is no significant penalty from using the single library even
if you don't use all the components (e.g. no SNES or TS) because those
pages won't actually be faulted when your application is loaded (shared
libs) and the symbols won't be included when you link statically.
Separate libraries are useful for PETSc developers to prevent
accidentally creating circular dependencies.


More information about the petsc-users mailing list