Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPI] recv throws exception: MPI_Unpack: MPI_ERR_TRUNCATE
From: Matthias Troyer (troyer_at_[hidden])
Date: 2010-06-10 00:25:30


Hi,

I don't think that there is a buffer size limit except available memory. I would recommend that you try two things:

1. Write to a binary archive and try to read back from it, and then compare whether you got the correct results. That will test whether your serialization is done correctly.

2. Try sending just your vector, to test whether there might be some hidden limit or bug with your MPI implementation.

Matthias

On Jun 8, 2010, at 10:44 AM, Riccardo Murri <riccardo.murri_at_[hidden]> wrote:

> Hello,
>
> I'm using Boost.MPI for a program that computes the rank of
> matrices. It currently works fine up to some matrix size; with larger
> matrices it throws an exception::
>
> terminate called after throwing an instance of
> 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::mpi::exception>
>> '
> what(): MPI_Unpack: MPI_ERR_TRUNCATE: message truncated
>
> I'm serializing a variable-length std::vector + some POD types;
> I guess the error comes from the resulting buffer exceeding some
> internal limit.
>
> Is this guess correct? How can I retrieve the max size of an MPI
> send buffer and fragment my mpi::send's?
>
> I'm using OpenMPI 1.4.1 (native Ubuntu 10.04 pkg).
>
> For reference, here's the serialization code::
>
> class DenseRow : public Row
> {
> // ...
> std::vector<long long> storage;
> template<class Archive>
> inline void
> DenseRow::serialize(Archive& ar, const unsigned int version)
> {
> ar & boost::serialization::base_object<Row>(*this) & storage;
> };
> // ...
> };
>
> class Row
> {
> // ...
> int starting_column_;
> int ending_column_;
> long long leading_term_;
> template<class Archive>
> inline void
> Row::serialize(Archive& ar, const unsigned int version)
> {
> ar & starting_column_ & ending_column_ & leading_term_;
> };
> };
>
> Thank you for any suggestion.
>
> Best regards,
> Riccardo
>
> --
> Riccardo Murri, Hadlaubstr. 150, 8006 Zürich (CH)
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net