Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Windows C++ Linker Error "unresolved symbol" for MPI::Datatype::Free
From: Damien Hocking (damien_at_[hidden])
Date: 2013-02-21 17:08:31


Found it. The MPI::Datatype class isn't exported in a Win dll (no
dllexport wrappers on the class), so on a shared-libs build it's not in
the library symbols for anything else to see. The Windows CMAKE
"BUILD_SHARED_LIBS" option is therefore busted. On a static lib build
everything's in there, a dumpbin shows all the MPI::Datatype symbols.
Those symbols are missing all the way back into 1.5 shared-lib builds as
well.

Damien

On 21/02/2013 12:19 PM, Jeff Squyres (jsquyres) wrote:
> On Feb 21, 2013, at 10:59 AM, Damien Hocking <damien_at_[hidden]> wrote:
>
>> Well this is interesting. The linker can't find that because MPI::Datatype::Free isn't implemented on the Windows build (in datatype_inln.h). It's declared in datatype.h though. It's not there in the Linux version either, so I don't know where the Linux build is getting that symbol from, that link should fail too. Is the C++ version of OpenMPI actually broken overall?
> It's implemented in Datatype.cc. I'm don't remember offhand why we didn't put it in the inline versions. But it's definitely in the generated libmpi_cxx.so:
>
> ------
> % nm -C libmpi_cxx.so | grep MPI::Datatype::Free
> 0000000000016ed8 T MPI::Datatype::Free()
> %
> -----
>