Skip to content

Fix bug4821 - Some tests request an incorrectly large segment size #6

Merged
bonachea merged 2 commits into
BerkeleyLab:developfrom
bonachea:test-seg-validate
May 14, 2026
Merged

Fix bug4821 - Some tests request an incorrectly large segment size #6
bonachea merged 2 commits into
BerkeleyLab:developfrom
bonachea:test-seg-validate

Conversation

@bonachea
Copy link
Copy Markdown
Member

In FAST/LARGE segment modes, always validate the segment size
request we're about to pass into gex_Segment_Attach or gasnet_attach
fits within gasnet_getMaxLocalSegmentSize, otherwise issue a
user-friendly error message.

Example testvis output (from a docker container with default shm):

ERROR: node 1/4 Test requested a GASNet segment of size=16777216, but this exceeds the currently available gasnet_getMaxLocalSegmentSize()=10477568.
You may need to adjust the memory resource limits of this system/shell, otherwise adjust test parameters to reduce segment utilization requirements. (at [redacted]/gasnet/tests/test.h:1023)

bonachea added 2 commits May 13, 2026 20:54
In FAST/LARGE segment modes, always validate the segment size
request we're about to pass into gex_Segment_Attach or gasnet_attach
fits within gasnet_getMaxLocalSegmentSize, otherwise issue a
user-friendly error message.

Example testvis output (from a docker container with default shm):
```
ERROR: node 1/4 Test requested a GASNet segment of size=16777216, but this exceeds the currently available gasnet_getMaxLocalSegmentSize()=10477568.
You may need to adjust the memory resource limits of this system/shell, otherwise adjust test parameters to reduce segment utilization requirements. (at [redacted]/gasnet/tests/test.h:1023)
```
@bonachea bonachea requested a review from PHHargrove May 14, 2026 03:58
Copy link
Copy Markdown
Collaborator

@PHHargrove PHHargrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for addressing this so quickly.

If it is not too much trouble, it might be wise to defer merge of this PR until after merge of my (soon to appear) PR to fix gex_Segment_Attach() to reject the oversized requests. Otherwise, this will eliminte the original reproducers for my issue.

@bonachea
Copy link
Copy Markdown
Member Author

If it is not too much trouble, it might be wise to defer merge of this PR until after merge of my (soon to appear) PR to fix gex_Segment_Attach() to reject the oversized requests. Otherwise, this will eliminte the original reproducers for my issue.

I'm in no rush to merge.
However FWIW the testhello with a numeric argument can still be used to reproduce bug 4822, because it (deliberately) does not use these test.h wrappers, and instead passes the segment size argument directly to gex_Segment_Attach

@PHHargrove
Copy link
Copy Markdown
Collaborator

[...] FWIW the testhello with a numeric argument can still be used to reproduce bug 4822

Valid point. I withdraw my request to defer merging this PR.

@bonachea bonachea merged commit 7801ffd into BerkeleyLab:develop May 14, 2026
38 checks passed
@bonachea bonachea deleted the test-seg-validate branch May 14, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants