Skip to Content.
Sympa Menu

charm - Re: [charm] [EXTERNAL] Re: Detect restart from app

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [EXTERNAL] Re: Detect restart from app


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT lanl.gov>
  • To: Tom Quinn <trq AT astro.washington.edu>
  • Cc: charm AT cs.illinois.edu
  • Subject: Re: [charm] [EXTERNAL] Re: Detect restart from app
  • Date: Thu, 19 Mar 2020 14:30:05 -0600
  • Authentication-results: illinois.edu; spf=fail smtp.mailfrom=jbakosi AT lanl.gov; dkim=pass header.d=lanl.gov header.s=lanl; dmarc=pass header.from=lanl.gov

I manged to pass an indicator from the Main ctor to where I need it via
a global variable. This is not ideal but I guess it works. With this
solution though, I need to ask the following:

Is the Main chare guaranteed to always reside on PE 0?

If that's the case, this solution is okay.

J

On 03.19.2020 11:13, Jozsef Bakosi wrote:
> Thanks, Tom,
>
> I noticed this too. But I the "distance" between my
> Main::Main(CkMigrateMessage* m) and CkStartCheckpoint() is pretty large
> and I don't have a clean way of passing in an indicator, so I was hoping
> to get that out of Charm++ via some API call.
>
> Jozsef
>
> On 03.19.2020 09:21, Tom Quinn wrote:
> > What I do in ChaNGa is:
> >
> > The Main object has an attribute "bIsRestarting". The
> > Main::Main(CkArgMsg*
> > m) constructor sets this to "0", while the Main::Main(CkMigrateMessage* m)
> > constructor (which is only called if restarting from a checkpoint) sets it
> > to "1". The callback method you pass to CkStartCheckpoint() can then test
> > on "bIsRestarting".
> >
> > Tom Quinn Astronomy, University of Washington
> > Internet:
> > trq AT astro.washington.edu
> > Phone: 206-685-9009
> >
> > On Thu, 19 Mar 2020, Jozsef Bakosi wrote:
> >
> > > Hi folks,
> > >
> > > Is there a way to detect from a Charm++ app that it just came back from
> > > a restart and not just finished a checkpoint?
> > >
> > > According to the manual:
> > >
> > > cb will be invoked after the checkpoint is done, as well as when the
> > > restart is complete:
> > >
> > > CkCallback cb(CkIndex_Hello::SayHi(), helloProxy);
> > > CkStartCheckpoint("log", cb);
> > >
> > > When cb is called, I'd like to zero some counters if and only if it just
> > > came back from a restart.
> > >
> > > Thanks,
> > > Jozsef



Archive powered by MHonArc 2.6.19.

Top of Page