Skip to Content.
Sympa Menu

charm - Re: [charm] vector< bool >

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] vector< bool >


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT lanl.gov>
  • To: Sam White <white67 AT illinois.edu>
  • Cc: "charm AT lists.cs.illinois.edu" <charm AT lists.cs.illinois.edu>, "Pandare, Aditya Kiran" <apandare AT lanl.gov>
  • Subject: Re: [charm] vector< bool >
  • Date: Thu, 12 Dec 2019 09:49:57 -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

Thanks, Sam,
J

On 12.12.2019 10:41, Sam White wrote:
> Hi Jozsef,
>
> Thanks for pointing this out. We already had a specialization in place for
> vector<bool> in pup_stl.h, but it was buggy.
> Here's a fix: https://github.com/UIUC-PPL/charm/pull/2650
>
> -Sam
>
>
> On Thu, Dec 12, 2019 at 9:53 AM Jozsef Bakosi
> <jbakosi AT lanl.gov>
> wrote:
>
> > 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