Define 'thisIndex' for Groups
Chare arrays all have a member variable 'thisIndex', while Groups and NodeGroups have a semantically similar ID called 'onPE'. This is an unnecessary pain when porting code from, say, a Chare Array to a Group.
Suggested fix: add a static member variable to Groups called thisIndex, whose value is the same as onPE.
#3 Updated by Karthik Senthil over 2 years ago
- Status changed from New to In Progress
thisIndex be defined as a static variable?
I have a current implementation which adds
thisIndex as a regular protected member(int) of the
IrrGroup class defined in charm++.h and ck.C
In the constructor
thisIndex is set as follows:
thisIndex = ckGetChareID().onPE;
This seems to be working for both Groups and NodeGroups. I've tested with examples/charm++/hello/group and tests/charm++/pingpong