[mpich-discuss] Linking to personal libraries

Pavan Balaji balaji at mcs.anl.gov
Fri Jun 7 08:38:21 CDT 2013


On 06/07/2013 08:35 AM, Wesley Bland wrote:
> As long as you have *.a versions of your library, you can use those
> instead of the *.so versions. You'll need to pass -static to mpicc to
> make that work.
>
> You also need to link MPICH statically, but as of all of the released
> versions of MPICH, that is the default behavior. In future releases,
> that will change. I believe the configure flag that you'll have to use
> is --enable-static, but I could be wrong about that.

FYI, --enable-static is the right flag, but it's not required.

Till mpich-3.0.4, the default is --enable-static --disable-shared.

 From mpich-3.1.x, the default will be --enable-static --enable-shared.

(though shared will be prioritized by the system, unless you pass 
-static to mpicc).

  -- Pavan

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji



More information about the discuss mailing list