[MPICH] linking libmpich.a into .so

Dave Goodell goodell at mcs.anl.gov
Tue Feb 19 13:31:39 CST 2008


Unfortunately, I can't speak to the possible performance degradation  
for dynamic linking.  Maybe someone else knows and will chime in, but  
my best advice is to benchmark your application on the target  
platform with dynamic linking and compare the results with the static  
results.  However I would like to point out that you can easily build  
a shared-library version of MPICH2 by passing the "--enable- 
sharedlibs" option to configure.  Here's the relevant section of the  
configure help message:

% ./configure --help
... snip ...
--enable-sharedlibs=kind - Enable shared libraries.  kind may be
     gcc     - Standard gcc and GNU ld options for creating shared  
libraries
     osx-gcc - Special options for gcc needed only on OS/X
     solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
     cygwin-gcc - Special options for gcc needed only for cygwin
     none    - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported
... snip ...

-Dave

On Feb 19, 2008, at 11:52 AM, chong tan wrote:

>   I have problem linking 64 libmpich.a into a .so object, in 64 bit  
> linux.   Suprisingly, I can do that with 32 bit libmpich.a.
>
> My question is, have anyone try building libmpich.a with -fPIC,  
> what kind of perofrmance degration can be expected with
> -fPIC flag ?
>
> thanks
> tan
>
>
> Looking for last minute shopping deals? Find them fast with Yahoo!  
> Search.




More information about the mpich-discuss mailing list