charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Abhinav Bhatele <bhatele AT illinoisalumni.org>
- To: SAGAR SHEDGE <sagar.shedge92 AT gmail.com>
- Cc: Charm Mailing List <charm AT cs.illinois.edu>
- Subject: Re: [charm] [ppl] About syntax
- Date: Fri, 5 Aug 2011 08:48:59 -0700
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hello Sagar,
CkArrayMap is used by the runtime i.e. Charm++ to provide a default mapping of array elements to physical processors. You can override that default mapping by creating your own map as the kNeighbor code does below.
A user defined mapping consists of providing a function which given the CkArrayIndex for an array element returns the processor the element resides on. This function is called procNum and you have to define it for a customized mapping.
For most chare arrays (1D, 2D, 3D) you do not need to write your own map function.
Also an alternative way of providing a map, it to use insert(int pe) for each array element when you create an array. Please look in the charm manual for examples.
- Abhinav
On Fri, Aug 5, 2011 at 5:42 AM, SAGAR SHEDGE <sagar.shedge92 AT gmail.com> wrote:
Respected Sir/Mam,
I was reading example from tests/charm++/kNeighbour/ , where I seen one syntax in .ci file.
group MyMap : CkArrayMap{
entry MyMap(int);
};
In .C file you have inherited MyMap from CkArrayMap and overloaded pure virtual function int procNum(int arrayHdl, const CkArrayIndex &idx).
I have query as follows :
1. I want to know why you have written CkArrayMap there , as CkArrayMap structure is internally used by charm++ to map array element to home processor.
2. In which cases we have write it?
3. What is purpose of procNum(int arrayHdl, const CkArrayIndex &idx). i.e. what you have done in that function? Also I am sending you both files.
--
Sagar Dilip Shedge,
C-DAC R&D,
Pune.With Regards.
_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm
_______________________________________________
ppl mailing list
ppl AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/ppl
--
Abhinav Bhatele
Postdoctoral Research Staff Member
Center for Applied Scientific Computing
Lawrence Livermore National Laboratory
- [charm] About syntax, SAGAR SHEDGE, 08/05/2011
- Re: [charm] [ppl] About syntax, Abhinav Bhatele, 08/05/2011
Archive powered by MHonArc 2.6.16.