Project

General

Profile

Bug #1148

Define 'thisIndex' for Groups

Added by Sam White almost 3 years ago. Updated over 2 years ago.

Status:
Merged
Priority:
Normal
Category:
-
Target version:
Start date:
07/21/2016
Due date:
% Done:

0%


Description

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.

History

#1 Updated by Sam White over 2 years ago

It would be good to have this soon, before the 6.8.0 release.

#2 Updated by Sam White over 2 years ago

  • Assignee changed from Edward Hutter to Karthik Senthil

#3 Updated by Karthik Senthil over 2 years ago

  • Status changed from New to In Progress

Why should 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

#4 Updated by Sam White over 2 years ago

The idea behind making it static was that we could save on memory overhead by having one instance of it. We can discuss whether that is important or not in core meeting. Go ahead and submit the patch as is.

#5 Updated by Karthik Senthil over 2 years ago

  • Status changed from In Progress to Implemented

#6 Updated by Karthik Senthil over 2 years ago

  • Status changed from Implemented to In Progress

#7 Updated by Phil Miller over 2 years ago

  • Status changed from In Progress to Merged

Also available in: Atom PDF