Skip to content

Conversation

@dlongnecke-cray
Copy link
Contributor

@dlongnecke-cray dlongnecke-cray commented Sep 30, 2025

This PR adds a test to measure communication counts for different dynamic loading events. It also does some more refactoring of the internal dynamic loading code as well as the code in the test directory.

Originally, the goal of this PR was to adjust the strategy used when loading a symbol from a binary so that it only generated 2 comm events: one when emplacing on the binary's locale, and another when emplacing on here. However, I identified that this would not be possible without a significant refactor to the code and the representation of wide procedures.

In lieu of making this adjustment, I've added a long comment with a TODO in an appropriate spot that identifies our options here. However, I don't think it's worth pursuing this adjustment until we have compelling evidence that a lazy emplacement strategy is required (certainly not before the compiler introduces optimizations to localize procedure pointers).

This PR also adds a new commCounter class that I added to help with measuring comm events. I've added it to the test/dynamic-loading directory because it is harmless there, but I may add a more robust version somewhere developer-visible in the future.

Before, the code would do things like explicitly synchronize on e.g.,
'Locales[0]'. Now, the code will synchronize 'on this' instead.

While here, improve/remove comments and add a new helper routine.

Signed-off-by: David Longnecker <[email protected]>
Also do some code cleanup and add a new method 'addOrSet' to the map
record which replaces overloaded functionality.

Signed-off-by: David Longnecker <[email protected]>
@dlongnecke-cray dlongnecke-cray self-assigned this Sep 30, 2025
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