Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] use of chareProxy.ckLocal(); whithout CMK_CHARE_USE_PTR

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] use of chareProxy.ckLocal(); whithout CMK_CHARE_USE_PTR


Chronological Thread 
  • From: Julien Bigot <julien.bigot AT inria.fr>
  • To: Gengbin Zheng <zhenggb AT gmail.com>
  • Cc: charm AT cs.uiuc.edu
  • Subject: Re: [charm] [ppl] use of chareProxy.ckLocal(); whithout CMK_CHARE_USE_PTR
  • Date: Sat, 25 Jun 2011 00:01:11 +0200
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
  • Organization: INRIA (Graal)

Le vendredi 24 juin 2011 23:24:37, Gengbin Zheng a écrit :
> It is a bug that incorrect object pointer is returned. I fixed in the
> latest branch of charm.
> Please update your charm and see if your program is working now.

Yes, it solved it !
Thank you very much !

> Gengbin
>
> On Fri, Jun 24, 2011 at 1:33 PM, Julien Bigot
> <julien.bigot AT inria.fr>
> wrote:
> > Hi,
> >
> > I'm trying to use chareProxy.ckLocal() on a platform where
> > CMK_CHARE_USE_PTR is undefined (net-linux-x86_64).
> >
> >
> > I've tried the attached test code and when runned I obtain the following
> > results:
> > % ./tst
> > [19:53]
> > Charm++: standalone mode (not using charmrun)
> > Converse/Charm++ Commit ID: v6.3.0-270-g47c6ae9
> > Charm++> scheduler running in netpoll mode.
> > Charm++> Running on 1 unique compute nodes (2-way SMP).
> > Charm++> cpu topology info is gathered in 0.000 seconds.
> > Tst1::Tst1(0xe5e9a0)
> > Tst2::Tst2(0xe5ee00)
> > Tst2::Tst2(0xe5f080)
> > Tst2::show_liveness(0xe5ee00)
> > Tst2::show_liveness(0xe5f080)
> > Tst1::on_quiescence(0xe5e9a0): proxy0.ckLocal() == 0, proxy1.ckLocal() ==
> > 0x1
> >
> > As you can see, when calling ckLocal, I obtain values that are neither
> > valid pointers nor always NULL while all chares are on the same node.
> >
> >
> > After some investigation in Charm++ code it seems to me that on not
> > CMK_CHARE_USE_PTR platforms, the value of chareProxy.ckLocal() for
> > virtual chare ids (returned as a result of CProxy::ckNew()) is an index
> > in CkpvAccess(chare_objs) and not a pointer.
> > * CkCreateChare creates a virtual ChareID (onPE<0) since the actual
> > chare doesn't exist yet and it sends a message to create the chare
> > * _processNewVChareMsg handles the message and calls _allocNewChare to
> > allocate the chare memory
> > * _allocNewChare returns an index in CkpvAccess(chare_objs) for a
> > pointer on the chare memory, not the actual pointer
> > * _processNewVChareMsg creates a message and sets its payload to a
> > CkChareID whose objPtr is this index
> > * _processFillVidMsg handles the message and uses its value to fill the
> > virtual id actualID.objPtr value
> > * when chareProxy.ckLocal() is called it returns the actualID.objPtr
> > value
> >
> >
> > Is this a known behavior of Charm++ or am I doing something wrong ?
> >
> > Regards,
> > --
> > Julien Bigot, Post-Doc., INRIA Team-Project Graal
> > LIP - 46 Allee d'Italie - 69364 Lyon - FRANCE
> > jabber:
> > jbigot AT jabber.org
> > web: http://graal.ens-lyon.fr/~jbigot
> > phone: +33 (0)4 37 28 76 43
> >
> > _______________________________________________
> > charm mailing list
> > charm AT cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/charm
> >
> > _______________________________________________
> > ppl mailing list
> > ppl AT cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/ppl

--
Julien Bigot, Post-Doc., INRIA Team-Project Graal
LIP - 46 Allee d'Italie - 69364 Lyon - FRANCE
jabber:
jbigot AT jabber.org
web: http://graal.ens-lyon.fr/~jbigot
phone: +33 (0)4 37 28 76 43

Attachment: signature.asc
Description: This is a digitally signed message part.




Archive powered by MHonArc 2.6.16.

Top of Page