Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2006-10-27 11:16:11


On Oct 27, 2006, at 11:04 AM, shane kennedy wrote:

> thank you for your reply. i am using mpicc/mpif90. i
> am able to successfully compile, but during execution
> i receive an "error while loading shared libraries."

See this FAQ category -- I believe your questions should be answered
there:

http://www.open-mpi.org/faq/?category=running

> i tried compiling/linking w/ -static flag to overcome
> the shared library error. however, linking w/ -static
> gives me an error of "ld: cannot find -lmpi." i do
> not have a libmpi.a file. i do have a libmpi.la file
> but don't know how to link to it.

The .la files are Libtool Archive files (for GNU Libtool). They are
only useful if you are using GNU Libtool to build your application
and you are not using our wrapper compilers (which is not
recommended). So -- you should probably just ignore them.

As for compiling statically, OMPI defaults to building dynamically
(and not statically). You can choose to build OMPI statically by
using the "--enable-static" (and potentially "--disable-shared")
options to OMPI's configure script. This will then create and
install libmpi.a (and others).

Note that per mails earlier this month on this list, there are
currently issues with creating *fully* static MPI executables with
OpenIB / OFED networks (i.e., compiling with -static as opposed to
just having libmpi.a so that MPI is statically included in your
application). Much discussion about this topic has occurred off this
list; more information should be available shortly (probably on the
FAQ). Feel free to ping me off-list if you need further information
before it becomes available on the FAQ.

-- 
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems