Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: make available memory visible to locales #26786

Open
jhh67 opened this issue Feb 26, 2025 · 1 comment
Open

[Feature Request]: make available memory visible to locales #26786

jhh67 opened this issue Feb 26, 2025 · 1 comment

Comments

@jhh67
Copy link
Contributor

jhh67 commented Feb 26, 2025

Chapel applications may want to scale the problem size based on the amount of memory available. Currently, they must rely on locale.physicalMemory, which is what several performance benchmarks do. This is inadequate for several reasons:

  • The maximum size of the Chapel heap may be constrained by CHPL_RT_MAX_HEAP_SIZE.
  • Co-locales share physical memory.
  • If PSHM is enabled in GASNet the locales' heaps are allocated from shared memory, which may be smaller than physical memory.

We need a mechanism for a locale to determine its "fair share" of the physical memory on the node. This is different from the maximum amount of memory that it can allocate because if there are several co-locales without fixed heaps then any one heap can grow to the size of physical memory, but each locale should size itself to use 1/Nth of the physical memory.

All of this would presumably be implemented by adding the appropriate field(s) to Locale; the tricky part is which fields to add.

@jhh67
Copy link
Contributor Author

jhh67 commented Feb 26, 2025

PR #2677 is a workaround for a particular test that doesn't size itself properly. It should be reverted once this feature is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant