Skip to Content.
Sympa Menu

charm - [charm] Charm++ execution order question

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Charm++ execution order question


Chronological Thread 
  • From: Evghenii Gaburov <e-gaburov AT northwestern.edu>
  • To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: [charm] Charm++ execution order question
  • Date: Sun, 25 Sep 2011 01:59:21 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi All,

I have some misunderstanding upon the order in which the messages arrive. I
read, that messages by default obey FIFO order

So, does the following code

"
void myClass::do_work()
{
/* do some work first */
for (int i = 0; i < nsend; i++)
myClass[remoteIndex[i]].recv(results[i]); /* send
data to remote chares */
contribute(0, 0, CkReduction::concat, CkCallback(do_work_complete(),
thisProxy)); /* barrier */
}

void myClass::recv(myResults remote_result) { store_remote_result; }
void myClass::do_work_complete() { process arrived remote_results;
}
"

guarantees that myClass::recv(..) methods will be executed first (because
they were called first),
and only afterwards a reduction part will call myClass::do_work_complete()
(because it is called second).
This order is required to make sure that when do_work_complete is only
invoked when *all* remote data has arrived.

Thanks!

Cheers,
Evghenii
--
Evghenii Gaburov,
e-gaburov AT northwestern.edu











Archive powered by MHonArc 2.6.16.

Top of Page