Opened 14 years ago

Closed 14 years ago

#2007 closed Bugs (fixed)

Missing header in Boost.MPI

Reported by: manuel.freiberger@… Owned by: Matthias Troyer
Milestone: Boost 1.36.0 Component: mpi
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

Compiling the small example in the attachment using Boost 1.35.0 and GCC 4.1.2 I get lots of errors similar to

undefined reference to `boost::archive::detail::archive_pointer_iserializer<boost::mpi::detail::forward_skeleton_iarchive<boost::mpi::packed_skeleton_iarchive, boost::mpi::packed_iarchive> >::~archive_pointer_iserializer()'

A workaround is to explicitly include boost/archive/impl/archive_pointer_?serializer.ipp. I think, these headers should be included either in Boost.MPI or in Boost.Serialization.

Best regards, Manuel

Attachments (2)

mpi-test.cpp (1.8 KB ) - added by manuel.freiberger@… 14 years ago.
Example code
log.zip (811 bytes ) - added by manuel.freiberger@… 14 years ago.
Output during build of test program

Download all attachments as: .zip

Change History (12)

by manuel.freiberger@…, 14 years ago

Attachment: mpi-test.cpp added

Example code

comment:1 by Matthias Troyer, 14 years ago

Do you link with the Boost.MPI library or just include the headers?

comment:2 by Matthias Troyer, 14 years ago

Owner: changed from Douglas Gregor to Matthias Troyer

comment:3 by Matthias Troyer, 14 years ago

Resolution: invalid
Status: newclosed

I'm closing this since this is most likely due to not linking against the Boost.MPI library

comment:4 by manuel.freiberger@…, 14 years ago

Resolution: invalid
Status: closedreopened

Yes, I _do_ link with Boost.MPI. Here is the command I used:

mpic++ -lboost_serialization-mt -lboost_mpi-mt -o mpi-test mpi-test.cpp

I tried to link the program with and without Boost.MPI and with and without the *.ipp files included. Including the files but not linking against Boost.MPI leads at least to undefined references to the communicator and so on. The program really only builds when both the *ipp files and the Boost.MPI library are included.

During the weekend I also found a discussion on the mailing list which is related to the problem I think: http://groups.google.no/group/boost-list/browse_thread/thread/9a50fcdaa867950c/3c3b5ac8f7919157?#3c3b5ac8f7919157 Unfortunately, the discussion did not lead to any solution, as far as I can see.

Would it be of help if I uploaded the whole log-file containing the linker errors?

/Manuel

by manuel.freiberger@…, 14 years ago

Attachment: log.zip added

Output during build of test program

comment:5 by anonymous, 14 years ago

Can you try this with the current svn version? The *.ipp files should never be included.

comment:6 by manuel.freiberger@…, 14 years ago

Ok, I downloaded the current Boost SVN version and compiled the sample program against it. If I do not include the *ipp files, I get the same errors as above. If I include the *ipp files, compiling and linking works, but I get the following error at execution:

mpirun -np 2 --hostfile myhosts ./mpi-test.exe ./mpi-test.exe: symbol lookup error: ./mpi-test.exe: undefined symbol: _ZN5boost13serialization6detail27extended_type_info_typeid_013type_registerERKSt9type_info ./mpi-test.exe: symbol lookup error: ./mpi-test.exe: undefined symbol: _ZN5boost13serialization6detail27extended_type_info_typeid_013type_registerERKSt9type_info

Probably this is a linker issue? The full version string of my compiler is

g++ (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)

/Manuel

comment:7 by anonymous, 14 years ago

I will look into it, The thread you mentioned above went nowhere since the original poster never replied after we checked in some patches.

One more thing to check: have you confirmed that serialization and deserialization works for a text or XML archive?

comment:8 by Matthias Troyer, 14 years ago

Can you try again with the current svn version? It now compiles, links and runs on my machine.

in reply to:  8 comment:9 by manuel.freiberger@…, 14 years ago

I just tried the recent SVN version and everything works fine for me too, now! There is no need any longer to include the *.ipp files!

Thank you very much for your help!

/Manuel

comment:10 by Matthias Troyer, 14 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.