Opened 14 years ago

Closed 13 years ago

#2151 closed Bugs (fixed)

Cannot build MPI datatypes for enumeration types

Reported by: Douglas Gregor Owned by: Matthias Troyer
Milestone: Boost 1.37.0 Component: mpi
Version: Boost Release Branch Severity: Problem
Keywords: Cc:

Description

When building MPI datatypes for enumeration types for which is_mpi_datatype is true, Boost.MPI ends up building a broken MPI datatype that causes segmentation faults. The problem seems to be that load_enum_type and save_enum_type (in boost/archive/iserializer.hpp and boost/archive/oserializer.hpp, respectively) actually perform the serialization call on an "int" rather than on the enum itself, causing the mpi_datatype_oarchive to receive an address on the stack.

Full test case is attached.

Attachments (1)

enum_test.cpp (908 bytes ) - added by Douglas Gregor 14 years ago.
Test case

Download all attachments as: .zip

Change History (3)

by Douglas Gregor, 14 years ago

Attachment: enum_test.cpp added

Test case

comment:1 by anonymous, 13 years ago

Owner: changed from Douglas Gregor to Matthias Troyer

comment:2 by Matthias Troyer, 13 years ago

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