Boost logo

Boost Users :

Subject: [Boost-users] [MPI] recv throws exception: MPI_Unpack: MPI_ERR_TRUNCATE
From: Riccardo Murri (riccardo.murri_at_[hidden])
Date: 2010-06-08 16:44:15


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 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