Skip to Content.
Sympa Menu

charm - Re: [charm] Object size

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] Object size


Chronological Thread 
  • From: Roberto de Quadros Gomes <rqg.gomes AT gmail.com>
  • To: Harshitha Menon <gplkrsh2 AT illinois.edu>, "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>, Phil Miller <mille121 AT illinois.edu>
  • Subject: Re: [charm] Object size
  • Date: Fri, 9 Aug 2013 21:21:35 -0300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Awsome people,

You were so fast! I am grateful a lot for this effort!
Now i will continue my development and, when I finish it, I'll share the results.

Thanks 


2013/8/9 Harshitha Menon <gplkrsh2 AT illinois.edu>
I have implemented what you need in charm. It is in branch objsize_lbdatabase. It records the size automatically and the new field pupSize is there in obj data which can be used in the lb strategy. 


On Fri, Aug 9, 2013 at 12:39 PM, Roberto de Quadros Gomes <rqg.gomes AT gmail.com> wrote:
Hi Harshitha,

If you have easy access to the code, can you send me the sample that you mentioned yesterday, please?
I tried to find in branch that you said but I didn't.

Thanks



2013/8/9 Harshitha Menon <gplkrsh2 AT illinois.edu>
How about adding a setter and getter (setObjSize and getObjSize) functions? You can look at how setObjTime method is implemented.

Alternatively, a better way would be for you to use a feature implemented by Gengbin (in branch  gzheng/lb-userdata) to add arbitrary user-defined data in LB database. This is in a separate branch of charm. I have sample code which includes the object size to lb database and a lb strategy can use it.

Harshitha








On Thu, Aug 8, 2013 at 7:07 PM, Roberto de Quadros Gomes <rqg.gomes AT gmail.com> wrote:
Yes, I am trying to use the size of data will be transfer on migration process in lb strategy. I want to combine cpuload, communication and memory size.

Let me explain what i am doing...

Cpu load and communication is easy to get, but when i use the ObjGraph on strategy the  memory size in not a member of Vertex class . Then, I opened the code and added this filed. I did some modifications for collect and put memory info to LDStats. With this way I can put any value and I can read that inside of strategy.
I modified LBObj , LDObjData too. I just put "int mem_size" in each struct and modifying the pup functions.

But I don't know how feed memory info with real value. I believe that there is some way to do this. I asked about AddObj method because I tried the reverse path (from LDStats to AMPI code) and there seems a good place to read this.

I don't have sure if tcharm size, or its stack size, has the memory information of my variables used in MPI code but I'd like try use this.


And yes, the object size of part of code could help me.



2013/8/8 Harshitha Menon <gplkrsh2 AT illinois.edu>
Are you trying to use the size of the object in some load balancing strategy?

How about collecting the object size as a part of the application code and using that in the lb strategy? Will that work for you?


On Thu, Aug 8, 2013 at 5:59 PM, Roberto de Quadros Gomes <rqg.gomes AT gmail.com> wrote:
Hi Harshitha,

Your code block worked! Thank you for that.
But now I would like to share my real problem.

I didn't understand what is the part of code represents the tcharm object created from AMPI code in LB.

I was thinking that the method AddObj ( located in LBDBManager.C) would be the best place to collect memory size from this object, but i don't know how do this. I thought that "__userdata"  represented this tcharm object, but I failed when tried use (TCharm*)__userdata.
 
I belive I think wrong and I really appreciate some help.

Thanks
Roberto Gomes



2013/8/8 Harshitha Menon <gplkrsh2 AT illinois.edu>
To get the size of an object, you can use the following piece of code.

int size;
PUP::sizer ps;
this->pup(ps);
size=ps.size();

Let me know if are having trouble using it in the LB strategy.

Harshitha


On Thu, Aug 8, 2013 at 9:43 AM, Bohm, Eric J <ebohm AT illinois.edu> wrote:


Begin forwarded message:

From: Roberto de Quadros Gomes <rqg.gomes AT gmail.com>
Subject: [charm] Object size
Date: August 5, 2013 9:12:09 PM CDT

Is there some way to get amount of bytes will be transfer in advance when the an object will be migrated?
I try collect this value to use on lb strategy but i am having difficulties.

Looking the code in cklocation.C file, CkLocRec_local constructor seems the best location, but i dont know to do this.

Some tip?
Thanks
Roberto Gomes
_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm












Archive powered by MHonArc 2.6.16.

Top of Page