Packing by index is inconsistent between `Group` and `ObjectManagerBase`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 287
- Forks
- 109
- Avg merge
- 4d 41m
- Merged PRs (30d)
- 5
Description
In Group, if packList is empty, we pack everything. In ObjectManagerBase, if packList is empty, we pack nothing.
I did not check everywhere, but I think that BufferOps respect the content of packList.
Isn't this discrepancy a bit dangerous?
When packing by index in https://github.com/GEOSX/GEOSX/blob/e7b071ea48cb14145699a2371280a6a463e427e7/src/coreComponents/dataRepository/Group.cpp#L386-L391
we basically have something like
if( packList.empty() ) {
packedSize += wrapperPair.second->pack( buffer, true, onDevice, events );
} else {
packedSize += wrapperPair.second->packByIndex( buffer, packList, true, onDevice, events );
}
while when packing by index in https://github.com/GEOSX/GEOSX/blob/e7b071ea48cb14145699a2371280a6a463e427e7/src/coreComponents/mesh/ObjectManagerBase.cpp#L243-L249
we roughly get the following behavior (the code is a little more complex for real, but this is the idea)
if( packList.size() > 0 )
{
// ... SNIP ...
packedSize += wrapper.packByIndex( buffer, packList, true, onDevice, events );
// ... SNIP ...
}
// Hereafter continue with the "recursive" part and nothing is done if packList is empty.
- Passes the integrated tests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the packing-by-index paths in src/coreComponents/dataRepository/Group.cpp and src/coreComponents/mesh/ObjectManagerBase.cpp, then inspect the related BufferOps behavior mentioned in the issue. Determine the intended empty-packList semantics, make the behavior consistent, and run the integrated tests to verify the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data, hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100