[petsc-users] static libs

Jed Brown jed at jedbrown.org
Thu Feb 20 18:29:29 CST 2020


Victor Eijkhout <eijkhout at tacc.utexas.edu> writes:

> On , 2020Feb20, at 15:26, Junchao Zhang via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
>
> The main disadvantage of dynamic shared libraries is the runtime performance costs of dynamic linking. Every time the program is executed it has to perform a large part of its linking process
>
> The main disadvantage of static linked libraries is the program load time. Each processor that executes the program has to load the executable from disk.
>
> Static => large executables => disk hit.

I mean, that code is loaded one way or another, be it in a shared
library or a static executable.  One advantage of shared libraries is
that code and read-only data can be shared between processes.  So when
you mpiexec -n 64 on your fat node, only one copy of the code and
read-only data needs to be resident in memory.


More information about the petsc-users mailing list