ckDestroy for Groups and NodeGroups
Jozsef Bakosi pointed out on the charm mailing list that we currently do not support deleting Groups. ckDestroy is only defined for Chare Arrays.
#7 Updated by Evan Ramos 11 months ago
- Status changed from New to Rejected
CProxy_MyChareArray array;, calling
array.ckDestroy(); only serves to broadcast a call to
ArrayElement::ckDestroy. This removes all the elements from the array but does not delete the array itself, if such a concept even exists.
CkArray::ckDestroy is never called. In testing I was able to insert new elements into the array after such a ckDestroy broadcast completed. Groups and nodegroups do not allow insertion or removal of elements so ckDestroy does not make sense for them in light of this fact. We would need to redefine ckDestroy which is out of scope of this issue.
Jozsef's original email to the Charm mailing list was IIRC more interested in how to best free the memory associated with a Group that is only transiently used. Even if it shouldn't be named ckDestroy() for semantic reasons, we should provide an API for freeing Groups, even if it's just a wrapper around 'delete this' for each element of the Group. We should also better document the semantics of ckDestroy(), the manual looks to be lacking here at the moment.