Skip to Content.
Sympa Menu

charm - Re: [charm] dummy_thread_chare

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] dummy_thread_chare


Chronological Thread 
  • From: Alexander Frolov <alexndr.frolov AT gmail.com>
  • To: Ronak Buch <rabuch2 AT illinois.edu>
  • Cc: "charm AT lists.cs.illinois.edu" <charm AT lists.cs.illinois.edu>
  • Subject: Re: [charm] dummy_thread_chare
  • Date: Fri, 4 Nov 2016 09:37:50 +0300

Does it mean that dummy_thread_chare can disguise some other work which can not be traced in Projections? That is my app is doing something usefull at that time?

Yep, threaded methods are used a lot in this case as I call NDMeshStreamer::insertData in them (TRAM calls CkYield() inside). 

The code snippet is:
  array [1D] BFSVertex {
    ...
    entry void update(int level, CmiUInt8 parent, int r);
    entry [threaded] void process(const dtype & m);
   };

bfs.C:
class BFSVertex {    
    ...
    void process(const dtype &data) {
      update(data.level, data.parent, data.r);
    }
    void update(int level, CmiUInt8 parent, int r) {
      if ((this->level >= 0) && (this->level <= level + 1))
        return;
      //CkPrintf("%d (pe=%d): updated, radius %d\n", thisIndex, getuChareSet()->getPe(), r);
      this->level = level + 1;
      this->parent = parent;
      if (r > 0) {
        state = Black;
        ArrayMeshStreamer<dtype, long long, BFSVertex, SimpleMeshRouter>
          * localAggregator = aggregator.ckLocalBranch();
        typedef typename std::vector<BFSEdge>::iterator Iterator;
        for (Iterator it = adjlist.begin(); it != adjlist.end(); it++) {
          localAggregator->insertData(dtype(this->level, thisIndex, r - 1), it->v);
        }
      } else {
        state = Gray;
        typedef typename std::vector<BFSEdge>::iterator Iterator;
        for (Iterator it = adjlist.begin(); it != adjlist.end(); it++) {
          thisProxy[it->v].update(this->level, thisIndex, R);
        }
      }
    }
};

p.s. When I was writing I came up on an idea. What will happen when CkYield is called in not threaded method? I just have noticed that MeshStreamer::receiveAtDestination is not threaded, and it call BFSVertex::process directly.

On Fri, Nov 4, 2016 at 2:47 AM, Ronak Buch <rabuch2 AT illinois.edu> wrote:
dummy_thread_ep is essentially a placeholder for situations when the full provenance of the unit to be traced is unknown.  Do you have a suspicion of what code is actually running during those times?  We have a few potential ideas that may make such logs more informative, but to help you directly, it would be helpful to understand what exactly your program is doing at that point.

Is it using threaded entry methods or some other form of suspend/resume, for example?

On Thu, Nov 3, 2016 at 2:41 PM, Alexander Frolov <alexndr.frolov AT gmail.com> wrote:
Hi all!

I have got bizarre behavior of my Charm++ application. Profiling it with projections shows that   dummy_thread_chare::dummy_thread_ep is frequently called and consumes much of the run time. Can anybody tell me what does this function  for and when it is called by the rts? 

I've attached the screenshot of Timelines to the email.

Thank you!

Best, 
    Alex





Archive powered by MHonArc 2.6.19.

Top of Page