1

Ok, so I've been trying to get boost::mpi and OpenMPI to play nicely together on Windows using Visual Studio 2013. Anyway, I've managed to build boost::mpi via manually specifying the path in mpi.jam as advised to at How to build boost::mpi library with Open MPI on Windows with Visual Studio 2010

So far so good.

I add the resulting lib files into my library path (libboost_mpi-vc120-mt-1_55.lib etc.) and proceed to build my application. These lib files are detected and linked in correctly, however there are link errors originating from the boost mpi lib file. So, I add all OpenMPI x64 libraries into my linker and get the same result. Naturally, I'm confused.

One of the link errors boost gives me is:

libboost_mpi-vc120-mt-1_55.lib(request.obj) : error LNK2001: unresolved external symbol ompi_request_null

So, dumpbin to the rescue...

$dumpbin.exe -headers libmpi.lib > mpi.out

  Version      : 0
  Machine      : 8664 (x64)
  TimeDateStamp: 4F198AB4 Sat Jan 21 04:39:32 2012
  SizeOfData   : 0000001D
  DLL name     : libmpi.dll
  Symbol name  : ompi_request_null
  Type         : data
  Name type    : name
  Hint         : 1187
  Name         : ompi_request_null

As you can see, libmpi.lib contains the symbol that the boost library can't find, and the library is indeed x64 (as is boost).

I know on unix the link order is important, so I tried manually linking libboost_mpi-vc120-mt-1_55.lib before libmpi.lib, but that didn't change anything.

I'm out of ideas. I don't usually like posting about link errors, but this one seems to have me beat..

Community
  • 1
  • 1
user1520427
  • 1,345
  • 1
  • 15
  • 27

0 Answers0