Skip to Content.
Sympa Menu

charm - Re: [charm] Charm++ runtime problem

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] Charm++ runtime problem


Chronological Thread 
  • From: "Kale, Laxmikant V" <kale AT cs.uiuc.edu>
  • To: Haowei Huang <huangh AT in.tum.de>, "Zheng, Gengbin" <gzheng AT illinois.edu>
  • Cc: "charm AT cs.illinois.edu" <charm AT cs.illinois.edu>, "kale AT illinois.edu" <kale AT illinois.edu>
  • Subject: Re: [charm] Charm++ runtime problem
  • Date: Sun, 1 Aug 2010 14:32:07 -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>

There is no problem with multiple A elements accessing (i.e. sending method invocations to) multiple members of B array. Charm Runtime makes sure that only one normal entry method is executing at a time.

 

But I want to make sure you understood the answer to the last email

Your code should be:

     chare A {
         ....
         void requestMsg{
              Msg1 * messageToB = new Msg1();

 … fill in fields of messageToB;
              arrayB[i].getValue(messageToB);
         }

 

And then have the getValue message free the incoming message.

Alternatively, you could use parameter marshalling to avoid using messages. You may benefit from looking at some example code.



 

(with the exceptions of threaded

 

 

--

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 Haowei Huang
Sent: Sunday, August 01, 2010 2:16 PM
To: Zheng, Gengbin
Cc: charm AT cs.illinois.edu
Subject: Re: [charm] Charm++ runtime problem

 

 
   Thanks a lot. But if multiple A array elements want to access multiple elements in the other B array at the same through parameter marshalling, are there any requirement for the attributes of entry method of A array and B array? I met runtime error when each element of A wants to access different elements of B only once at the same time. It seems that this kind of operation is not thread safe. How can we guarantee the atomicity of each point to point communication between chares?

2010/8/1 Gengbin Zheng <zhenggb AT gmail.com>


In Charm++, after you send a message, you can not reuse that buffer. Charm++ runtime will free the send message.
Here, your messageToB points to "local information". Charm++ runtime owns messageToB after you call getValue, and it will free that buffer when send completes. You need to create a new messageToB message every time when sending it.

Gengbin

On Sun, Aug 1, 2010 at 9:10 AM, Haowei Huang <huangh AT in.tum.de> wrote:

Hi phil,

     I want to create a point-to-point communication between two chares each of which is an element of a chare array. For example,
     chare A {
         ....
         void requestMsg{
              messageToB = local information;
              arrayB[i].getValue(Msg1*messageToB);
         }
        
         void comsumingMsg(Msg2*msgFromB){
          
             //dealing with msgFromB;
      
         }
     }

     chare B {
          
          void getValue(Msg1*message){

                arrayA[j].comsumingMsg(Msg2*messageToA);

         }
    }

     However, I always get such runtime error "Reason: Message being re-sent. Aborting... "  Do you have any idea about it? As far as I know ,this is one of four ways to create point-to-point with return value. How does Charm++ guarantee this communication happens atomically except for using [sync] entry methods? Thank you so much.

--
Haowei Huang
Ph.D. student
Technische Universitaet Muenchen
Institut fuer Informatik, I10
Boltzmannstr. 3
D-85748 Garching
Room 01.06.061
Phone: +49 (89) 289 18477
mailto: huangh AT in.tum.de

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






--
Haowei Huang
Ph.D. student
Technische Universitaet Muenchen
Institut fuer Informatik, I10
Boltzmannstr. 3
D-85748 Garching
Room 01.06.061
Phone: +49 (89) 289 18477
mailto: huangh AT in.tum.de




Archive powered by MHonArc 2.6.16.

Top of Page