Skip to Content.
Sympa Menu

charm - [charm] vector< bool >

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] vector< bool >


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT lanl.gov>
  • To: charm AT lists.cs.illinois.edu
  • Cc: "Pandare, Aditya Kiran" <apandare AT lanl.gov>
  • Subject: [charm] vector< bool >
  • Date: Thu, 12 Dec 2019 08:51:08 -0700
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=jbakosi AT lanl.gov; dkim=pass header.d=lanl.gov header.s=lanl; dmarc=pass header.from=lanl.gov

Hi folks,

We have recently run into a very nasty problem that was pretty hard to
diagnose: serializing a std::vector< bool > corrupts its contents and
will yield dissimilar data on different PEs. We fixed the problem by
using std::vector< int > instead, which serializes correctly.

The problem with std::vector< bool > is somewhat well-known, see e.g.,
https://stackoverflow.com/questions/17794569/why-is-vectorbool-not-a-stl-container/17794965#17794965,
and this is probably the cause of the erroneous behavior with the
serialization machinery.

It would be very user-friendly if Charm++ handled this special case
correctly.

Thanks,
Jozsef



Archive powered by MHonArc 2.6.19.

Top of Page