Skip to content

[HOLD] ibv: remove several 16-bit node number limitations#8

Draft
PHHargrove wants to merge 1 commit into
BerkeleyLab:developfrom
PHHargrove:ibv-pre-maxnodes
Draft

[HOLD] ibv: remove several 16-bit node number limitations#8
PHHargrove wants to merge 1 commit into
BerkeleyLab:developfrom
PHHargrove:ibv-pre-maxnodes

Conversation

@PHHargrove
Copy link
Copy Markdown
Collaborator

This PR is "DRAFT" status, pending completion of DC work to motivate a larger node number space.

ibv: remove several 16-bit node number limitations

This commit removes the following assumptions that GASNET_MAXNODES is no larger than 16 bits:

  • XRC table uses 32-bit fields
  • XRC sort helper doesn't assume (node <= INT_MAX)
  • gasnetc_epid_t is now a 64-bit type (32 bits for node number)
  • Dynamic connect logic uses a 28-bit field for node number

Of those changes, only the widening of gasnetc_epid_t has any potential impact on performance-critical paths on LP64 platforms (having made two struct types larger by up to four bytes each). The other change are relevant only during initialization and/or (non-default) dynamic connection establishment.

Additionally a check for 16-bit overflow at initialization has been removed. However, that was already impossible since GEX fixed gex_Rank_t at 32 bits (to allow definition in gasnet_fwd.h) where G-1 had allowed ibv-conduit to narrow it to just 16.

Together the changes in this commit support up to 28-bit node numbers in the initialization and connection logic. In the absence of dynamic connection support (not currently a configure-time option), there are no known barriers to job startup with 32-bit node numbers.

However, this commit does NOT change GASNET_MAXNODES because the AM header is still limited to a 16-bit field for the source rank.

@PHHargrove PHHargrove requested a review from bonachea May 28, 2026 19:43
@PHHargrove PHHargrove self-assigned this May 28, 2026
@PHHargrove PHHargrove marked this pull request as draft May 28, 2026 19:43
@bonachea bonachea removed their request for review May 28, 2026 19:57
This commit removes the following assumptions that `GASNET_MAXNODES`
is no larger than 16 bits:

+ XRC table uses 32-bit fields
+ XRC sort helper doesn't assume (node <= INT_MAX)
+ `gasnetc_epid_t` is now a 64-bit type (32 bits for node number)
+ Dynamic connect logic uses a 28-bit field for node number

Of those changes, only the widening of `gasnetc_epid_t` has any
potential impact on performance-critical paths on LP64 platforms
(having made two struct types larger by up to four bytes each).
The other change are relevant only during initialization and/or
(non-default) dynamic connection establishment.

Additionally a check for 16-bit overflow at initialization has been
removed.  However, that was already impossible since GEX fixed
`gex_Rank_t` at 32 bits (to allow definition in `gasnet_fwd.h`) where
G-1 had allowed ibv-conduit to narrow it to just 16.

Together the changes in this commit support up to 28-bit node numbers
in the initialization and connection logic.  In the absence of dynamic
connection support (not currently a configure-time option), there are
no known barriers to job startup with 32-bit node numbers.

However, this commit does NOT change `GASNET_MAXNODES` because the AM
header is still limited to a 16-bit field for the source rank.
@PHHargrove
Copy link
Copy Markdown
Collaborator Author

See https://bitbucket.org/berkeleylab/gasnet/pull-requests/464 for prior history of this PR.

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.

1 participant