why not a single PETSc library
Jed Brown
jed at 59A2.org
Tue Jun 9 18:15:16 CDT 2009
Dima Karpeev wrote:
> Don't .so's get loaded into memory as one whole piece?
They get mapped into virtual memory as one piece, but this doesn't mean
they are actually read from disk. Then the dynamic linker does symbol
relocations for the symbols referenced by your app, but this also does
not require loading of the entire shared lib. In general only the pages
of the shared lib that are used actually end up in physical memory.
To see this in action, run a tiny program that references a huge library
(debug PETSc would do). The program may use lots of virtual memory (>
100 MB), but very little (< 10 MB) physical memory (RES).
So it's potentially an issue if you are using shared libs on a machine
with very limited virtual memory available (32-bit, or with a kernel
configured to not overcommit memory). But since DM+SNES+TS is so small,
you would have to be extremely close to your system limits, asuming you
were already using KSP.
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090610/ecf6c649/attachment.sig>
More information about the petsc-dev
mailing list