Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] Message not making it

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] Message not making it


Chronological Thread 
  • From: "Geoff D. Hilyard" <gdhilyard AT RegalDecision.com>
  • To: Ehsan Totoni <totoni2 AT illinois.edu>
  • Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] [ppl] Message not making it
  • Date: Wed, 19 Sep 2012 13:55:59 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

 

Thanks for the Reply.

 

Here is what I’m really trying to do ( Initialization step ):

Read Gridpoint locations from a binary file

Setup Gridpoint topology

Read Pedestrain type information from a file ( Handicap, speed, tendencies, etc )

Read Pedestrian information from a file and place them on a grid point

[Repeat for a whole bunch of other items]

 

In the previous case, the message being sent to the grid point is specific only to that grid point.  So, if I have 6k grid points, I will generate 6k unique messages.  Hence, I cannot call setVars on the first gridpoint, and it will call setVars on the second ( Like most of the examples in the examples folder ).

 

Note that in Charm++, an entry method runs until completion”

I had assumed that things were asynchronous, and once the function was called, a message was sent.  I don’t have the [sync] keyword used for this function.

 

If I’m understanding you correctly, in my CCharmEntry::CCharmEntry(CkArgMsg* msg), I would read from file, send the messages, and exit.  At the end of the setVars function, I would call DoneWithSetupGridPoints on the mainProxy, which would have a counter of how many grid points need to call back.  Once all of them call back, I would call another function, in this case SetUpGridPointTopology.  This function would call SetupConnections on each Gridpoint ( in my case, since its an array, I can call gridPointArray. SetupConnections() and it will call them all, since order does not matter ).  This function would call DoneWithGridPointSetupConnections on my mainProxy, which is the same as DoneWithSetupGridPoints.  Once all have reported back, I then go to the next step, etc., etc..

 

Is this what I would have to do?  Is there a way, in the middle of an entry, to have the messages be dispatched?  Or is there a better way of initializing everything?  It seams the initialization would get very messy, and since I’m not the only one who will be working on this, I would like to make it as clean as possible.

 

I’ve been thru the Hello examples, and have been poking around the other examples that are in the examples/charm++ directory.  I’ve also been thru the online manual a few times as well.  It almost looks like the SDAG stuff is what I really need, although I haven’t looked at it too indepth.

 

Thanks again

Geoff Hilyard

 

From: Ehsan Totoni [mailto:totoni2 AT illinois.edu]
Sent: Wednesday, September 19, 2012 9:43 AM
To: Geoff D. Hilyard
Cc: charm AT cs.uiuc.edu
Subject: Re: [ppl] [charm] Message not making it

 

Hi Geoff,

 

Seems like your program conflicts with some of the fundamental concepts of Charm++. "gridPointArray[iGridPointNumber].SetVars(tmpMessage)" is not a C++ function call, but an asynchronous method invocation. When you make this call in the simple scenario of standalone mode, that entry method call will be put on the queue of the scheduler. The scheduler will run that entry method when it gets a chance, but you don't give it a chance! Your Main classes entry method never gets finished because of the infinite loop. Note that in Charm++, an entry method runs until completion. You can remove the infinite loop and add a reduction to your setvars method after completion. Please take a look at the Charm++ examples, e.g. 1darray hello.

 

Good luck,

-Ehsan




Archive powered by MHonArc 2.6.16.

Top of Page