Opened 10 years ago

Last modified 10 years ago

#7558 new Bugs

MPI missing symbols using serialization's static library design

Reported by: Brian Barrett <bwbarre@…> Owned by: Matthias Troyer
Milestone: To Be Determined Component: mpi
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

On Mac OS X Lion, we're seeing errors when linking our application using Boost.MPI. The application is rather large and uses Boost.Serialization for both checkpoint/restart and MPI communication. The checkpoint/restart bits made serialization a bit of a disaster in terms of compile times (due to headers including basically every other header in the project). To solve that problem, we followed the Boost.Serialization advice on static libraries.

On Lion (and possibly elsewhere, but definitely on Lion) using the gcc front-end (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)), we're seeing link failures due to serialization calls for MPI archivers not being found when compiling with -O2 or higher on Boost 1.50.0 and 1.51.0:

CXXLD sst.x

Undefined symbols for architecture x86_64:

"void SST::Introspector::serialize<boost::mpi::packed_iarchive>(boost::mpi::packed_iarchive&, unsigned int)", referenced from:

boost::archive::detail::iserializer<boost::mpi::packed_iarchive,

SST::Introspector>::load_object_data(boost::archive::detail::basic_iarchive &, void*, unsigned int) const in introspectedComponent.o

boost::archive::detail::iserializer<boost::mpi::packed_iarchive,

SST::Introspector>::load_object_data(boost::archive::detail::basic_iarchive &, void*, unsigned int) consti n simulation.o

While I could simply explicitly instantiate the missing archivers, that seems like a bad idea for something in the detail namespace and it appears that the list of archivers I'd need to instantiate has changed over time. The mailing list suggested that this sounded like a bug and that I should file a bug report.

I've attached a test case that shows the problem. It's essentially the Boost.Serialization demo_pimpl example, but using MPI instead of a text archiver.

Attachments (1)

mpi_serialization_test.tar.gz (1.6 KB ) - added by Brian Barrett <bwbarre@…> 10 years ago.

Download all attachments as: .zip

Change History (2)

by Brian Barrett <bwbarre@…>, 10 years ago

comment:1 by Matthias Troyer, 10 years ago

Owner: changed from Douglas Gregor to Matthias Troyer

What do you mean by "we followed the Boost.Serialization advice on static libraries?" Did you explicitly instantiate the serialization function for some of the archives in Boost.Serialization? If so then this is expected since Boost.MPI provides additional archive types.

Note: See TracTickets for help on using tickets.