Make _fastArrayMapID as readonly to ensure it gets broadcast and checkpointed25/2525/1
commitac6dcdc4f3a2b0403966e15e306a71c09642d997
authorPhil Miller <mille121@illinois.edu>
Mon, 15 May 2017 21:52:55 +0000 (15 16:52 -0500)
committerPhil Miller <mille121@illinois.edu>
Mon, 15 May 2017 22:03:05 +0000 (15 17:03 -0500)
tree8c770f18e2cb81b8759723aaab7306bb4710444b
parent07b6831aca6f884cc88895d921ad32b5300eaf85
Make _fastArrayMapID as readonly to ensure it gets broadcast and checkpointed

Related to fixing bug #1507, we were seeing failures in creating new
CkIO write session chare arrays after restarting from a
checkpoint. The value of _fastArrayMapID was inexplicably zero, rather
than the actual ID of the map group created at startup.

Adding assertions all over the place that the map ID was non-zero
didn't directly help - none of them triggered until the one
immediately preceding the crash point. What led me to the culprit was
the different seen between these two searches:

$ git grep _defaultArrayMapID

src/ck-core/ckarray.C:extern CkGroupID _defaultArrayMapID;
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:      map(_defaultArrayMapID) {
src/ck-core/ckarrayoptions.C:  if (b && map == _defaultArrayMapID) map = _fastArrayMapID;
src/ck-core/cklocation.C:CkGroupID _defaultArrayMapID;
src/ck-core/cklocation.C:               //_defaultArrayMapID = CProxy_HilbertArrayMap::ckNew();
src/ck-core/cklocation.C:               _defaultArrayMapID = CProxy_DefaultArrayMap::ckNew();
src/ck-core/cklocation.C:                CkAssert(!_defaultArrayMapID.isZero());
src/ck-core/cklocation.ci:  readonly CkGroupID _defaultArrayMapID;     # <---- Note absence below
src/ck-core/cklocation.h:extern CkGroupID _defaultArrayMapID;

$ git grep _fastArrayMapID
src/ck-core/ckarray.C:extern CkGroupID _fastArrayMapID;
src/ck-core/ckarray.C:  CkAssert(!_fastArrayMapID.isZero());
src/ck-core/ckarrayoptions.C:  if (b && map == _defaultArrayMapID) map = _fastArrayMapID;
src/ck-core/cklocation.C:CkGroupID _fastArrayMapID;
src/ck-core/cklocation.C:               _fastArrayMapID = CProxy_FastArrayMap::ckNew();
src/ck-core/cklocation.C:                CkAssert(!_fastArrayMapID.isZero());
src/ck-core/cklocation.h:extern CkGroupID _fastArrayMapID;

Change-Id: I2a1afbfd95f74fe1de5d8e99b2195b71e28f6938
src/ck-core/cklocation.ci