Skip to Content.
Sympa Menu

charm - [charm] Using [sync] entry methods

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Using [sync] entry methods


Chronological Thread 
  • From: Elliott Brossard <snowden AT cs.washington.edu>
  • To: charm AT cs.uiuc.edu
  • Subject: [charm] Using [sync] entry methods
  • Date: Thu, 18 Nov 2010 12:30:52 -0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hello, both my advisor and I have been trying to use [sync] entry methods in Charm++ but without any luck. Here are the relevant bits of code:

From exclusive_chare.ci:
module exclusive_chare {
  array [1D] ExclusiveChare {
    entry ExclusiveChare();
    entry [sync] void goToSleep();
  };
};

From exclusive_chare.C:
void ExclusiveChare::goToSleep() {
    CkPrintf("Sleeping at index %d\n", thisIndex);

    for(int i = 0; i < 10; i ++)
        sleep(10);

    CkPrintf("Done sleeping at index %d\n", thisIndex);
}

From main.C:
Main::Main(CkArgMsg* msg) {
    int numChares = 10;
    mainProxy = thisProxy;

    exclusiveProxy = CProxy_ExclusiveChare::ckNew(numChares);
    for(int i = 0; i < 10; i ++) {
        CkPrintf("Calling sleep on chare %d\n", i);
        exclusiveProxy[i].goToSleep();
    }
}

However, when I compile and run the program, this is the output I see:
Charm++: scheduler running in netpoll mode.
Charm++> Running on 1 unique compute nodes (8-way SMP).
Charm++> Cpu topology info:
PE to node map: 0 0 0 0 0 0 0 0
Node to PE map:
Chip #0: 0 1 2 3 4 5 6 7
Charm++> cpu topology info is gathered in 0.010 seconds.
Calling sleep on chare 0

...after which there is no further output. It appears that Charm++ is blocking in a way that prevents the method from even being executed. Am I doing something wrong? If you could point me to a working example of [sync] entry methods that would be great.

Thank you,
Elliott Brossard
University of Washington
Department of Computer Science and Engineering




Archive powered by MHonArc 2.6.16.

Top of Page