appio: Mark intercepting functions as public such that they are properly linked when using the PAPI shared library#501
Merged
Treece-Burgess merged 1 commit intoicl-utk-edu:masterfrom Oct 31, 2025
Conversation
…rly linked when using the PAPI shared library
Contributor
|
I am reviewing this PR. |
Contributor
|
I have tested this pull request on the Frontier supercomputer (AMD Zen3 architecture, GCC 12.2.0). All PAPI utilities function properly. With the changes in this PR, I observe that the following
@Treece-Burgess In order to test that these changes had the intended effect on the component tests, I had to manually edit 'components/appio/tests/Makefile' to dynamically link PAPI to the targets. Should we make a variable in this Makefile that is commented-out by default, but can be toggled? This might be overkill, but it could be helpful for future testing. |
dbarry9
approved these changes
Oct 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
In the appio component, if you compile the tests
appio_test_seek.c,appio_test_fread_fwrite.c,appio_test_read_write.c,appio_test_values_by_code.c,appio_test_values_by_name.c, andappio_test_pthreads.cwith the PAPI shared library, the counter values will be zero:With the PAPI static library this does not occur.
Further, if we use
LD_DEBUG=allon the executable fortest_appio_read_write.cyou will see that foropenwe bind withlibc.so.6versions rather than our own implementation:This PR resolves this behavior by explicitly setting our intercepting functions as public.
Testing
Testing was done on Methane at ICL with the setup of:
The aforementioned tests that returned 0 values when linking with the PAPI shared library now do not show zero values. Further, these values are comparable to the case of linking with the static library:
If we again look at the output when using
LD_DEBUG=allon the executable fortest_appio_read_write.c, you will now see we bind with our internal implementation ofopen:NOTE: The tests
appio_test_blocking.c,appio_test_recv,appio_test_select, andappio_test_socketwere not tested as they currently hang in the master branch and need to be addressed in a separate PR.Author Checklist
Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
Commits are self contained and only do one thing
Commits have a header of the form:
module: short descriptionCommits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
The PR needs to pass all the tests