Skip to Content.
Sympa Menu

charm - Re: [charm] how to suspend/resume a chare ?

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] how to suspend/resume a chare ?


Chronological Thread 
  • From: "Kale, Laxmikant V" <kale AT cs.uiuc.edu>
  • To: Christian Perez <christian.perez AT inria.fr>, Filippo Gioachin <gioachin AT uiuc.edu>
  • Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>, "kale AT illinois.edu" <kale AT illinois.edu>
  • Subject: Re: [charm] how to suspend/resume a chare ?
  • Date: Tue, 25 May 2010 10:20:38 -0500
  • 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>

Why not use the sync method solution? (and I assume you declared m1 to be threaded).

 

(And to understand your problem, a little more detail will be useful. Who created the callback? (m1 or m2)? Etc. Showing code fragment omitting all but the relevant calls will be good.)

 

With sync method, it’d look like this

 

M1() { ……; proxy.m2();  … }

M2(){… }

 

In .ci: m1 is threaded and m2 is sync.

 

--

Laxmikant Kale                  http://charm.cs.uiuc.edu

Professor, Computer Science     kale AT illinois.edu

201 N. Goodwin Avenue           Ph:  (217) 244-0094

Urbana, IL  61801-2302          FAX: (217) 265-6582

 

 

From: charm-bounces AT cs.uiuc.edu [mailto:charm-bounces AT cs.uiuc.edu] On Behalf Of Christian Perez
Sent: Tuesday, May 25, 2010 10:00 AM
To: Filippo Gioachin
Cc: charm AT cs.uiuc.edu
Subject: Re: [charm] how to suspend/resume a chare ?

 

Hello,

CkCallbackResumeThread() seems to be the perfect answer for one process ... but it fails when using several processes :
<<
Fatal error on PE 1> Called thread_delay on different processor than where callback was created
>>

Is there a standard mechanism to solve this issue or should I use an ad-hoc solution by forcing the
creation of a local chare?

My strong constraint is that m1 can not be spitted in two :(

Christian

On 05/24/2010 11:01 PM, Filippo Gioachin wrote:

Christian,

 

for your purposes, I would suggest looking at the manual on section 3.2.1 (Entry Method Attributes) regarding "threaded" and "sync" entry methods. A combination of the two (m1 threaded and m2 sync) should solve your problem.

Additionally, callbacks are very useful to resume threads as well; 3.15.2 shows how CkCallbackResumeThread can be used to resume m1().

Please remember that other entry methods may run while m1 is suspended, including other m1 methods.

 

Filippo

 

On Thu, May 20, 2010 at 03:58, Christian Perez <christian.perez AT inria.fr> wrote:

Hello,

I'd like to know how to block a thread. Here is a simple version of what
I'd like to do:

Chare A:
  m1() {
    do some computation
    invoke method m2 on chare B
    wait for the completion of method m2
    do something else
  }

I've tried to use some callback mechanism but the problem is that
I can not split m1 in two :(

So, is there a wait to suspend the execution (and also how to resume it) ?

Thank you!

Christian Perez

_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm




--
Filippo Gioachin
PhD Candidate
Department of Computer Science
University of Illinois at Urbana-Champaign
Ph: +1-217-333-4764

 




Archive powered by MHonArc 2.6.16.

Top of Page