aja2111 at columbia.edu
Wed Feb 27 02:05:24 CST 2008
On Wed, Feb 27, 2008 at 2:11 AM, amjad ali <amjad11 at gmail.com> wrote:
> Hello all,
> Please answer the following,
> 1) What is the difference between static and dynamic versions of petsc?
Start here: http://en.wikipedia.org/wiki/Library_(computer_science)#Static_libraries
In PETSc the primary differences end up being the size and link-time.
Statically-linked executables need all the possible code that they
could contain in the actual file, so they can be up to several MB in
size. Dynamically-linked executables are much leaner for the small
price of a little extra load time.
Now if you're talking about Dynamically-Loaded code, that's a bit hairier...
> 2) How to check that which version (static or dynamic) is installed on a
The fastest way is probably to look in $PETSC_DIR/$PETSC_ARCH/
If you see .a files, you've got static libraries, if you see .so or
.dylib files you've got dynamic libraries.
> 3) Plz comment on if there is any effect of static/dynamic version while
> using/calling petsc from some external package?
I'm not sure what you're asking here. If you mean "Is there a
difference between calling dynamically compiled PETSc from statically
compiled PETSc" the answer is no. There are differences in how you
compile and link the two version but your actual code would look the
Again, if we're talking about dynamically loaded code (using something
like dl_open), then your code will look different.
> 4) how to update an already installed petsc version with newerer/latest
> version of petsc?
Doing this in place is more trouble than it's worth if you're not
using a development copy . I just grab the latest copy of PETSc from
their webpage, then re-build and re-install.
More information about the petsc-users