charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Yan Liu <yanliu AT cybergis.org>
- To: Harshitha Menon <gplkrsh2 AT illinois.edu>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] use LBObjUserData
- Date: Sat, 06 Dec 2014 19:50:40 -0600
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hi Harshitha,
This is exactly what I want. I'll try it out. I have 3 follow-up questions, though. Question 1: To use it, I need to define my own user data struct. In the example in userdata_struct.h, user data struct is defined as: class LBUserDataStruct { public: int idx; LDObjHandle handle; void pup(PUP::er &p) { p|idx; p|handle; } }; I wonder if idx and handle fields are required, or I can define whatever fields I want as long as I define a pup method in it? Question 2: In hello.C, load balancer user data memory is obtained by calling getObjUserData(CkpvAccess(_lb_obj_index)). Where is getObjUserData() defined? I couldn't find it in src/ck-ldb/. Is it a global function? Question 3: If I pass my own load data this way, do I have to use AtSync mode to invoke LB? Can I still use periodical LB mode? Thanks, Yan Harshitha Menon wrote on 12/06/2014 07:17 PM: Hi Yan,
Just to make it clear, you would like to pass some user
specified data to the load balancer and use that data in the
LB implementation you have right?
If so, we have a feature in Charm where user can specify
data for the load balancer to use. Please take a look at the
example given in tests/charm++/load_balancing/lb_userdata_test
folder in Charm.
To enable this feature, you need to compile charm with
--enable-lbuserdata.
Let us know if you have trouble with this.
Harshitha
On Sat, Dec 6, 2014 at 7:07 PM, Yan Liu
<yanliu AT cybergis.org>
wrote:
I'd like develop my own load balancer in this way: 1. when I do ckNew, I'd like to pass lb data to load balancer; 2. in LB implementation, I'll call stats->objData[i]->getUserData() to retrieve the data passed in 1. I don't know how to do 1. Any suggestions? Or LBObjUserData is used in a very different situation? Thanks, Yan _______________________________________________ charm mailing list charm AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/charm |
- [charm] use LBObjUserData, Yan Liu, 12/06/2014
- Re: [charm] use LBObjUserData, Kale, Laxmikant V, 12/06/2014
- Re: [charm] use LBObjUserData, Yan Liu, 12/06/2014
- Re: [charm] use LBObjUserData, Yan Liu, 12/06/2014
- Re: [charm] use LBObjUserData, Yanhua Sun, 12/06/2014
- <Possible follow-up(s)>
- Re: [charm] use LBObjUserData, Yan Liu, 12/06/2014
- Re: [charm] use LBObjUserData, Kale, Laxmikant V, 12/06/2014
Archive powered by MHonArc 2.6.16.