Add PAPI metrics collection#248
Open
Dr. Michele Guidolin (mo-mguidolin) wants to merge 63 commits into
Open
Conversation
…the metrics value
…not counted as an vernier overhead
…rted inside a single thread vernier region
…eadlock. Added the use of threadsafe for these tests
… if the metrics is not available.
…thub Copilot Enterprise
Author
|
A new overhead analysis ( I deleted the previous one) First one about deep callstack overhead: The app is run on three configurations
The app is run on a Genoa node twice. One without PAPI metrics and one with PAPI metrics. Naturally only the configuration with active PAPI will collect the metrics on the second run The results Main Vernier: PR without PAPI PR with PAPI |
Author
|
Second one with openmp This app is run on a Genoa node but with 4 threads and 48 mpi tasks The results Main Vernier: PR without PAPI PR with PAPI |
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.
Description
These changes add the PAPI (Performance Application Programming Interface) library as an optional feature, allowing Vernier to collect hardware performance metrics (e.g. PAPI_FP_OPS, PAPI_TOT_INS, PAPI_TOT_CYC) alongside existing wall-time measurements.
Summary
Extra:
VERNIER_PAPI_EVENTSthat takes a comma-separated list of events to collect.Build:
ENABLE_PAPI(default OFF).PAPI_DEBUGoption for verbose PAPI call logging.FindPAPI.cmakemodule to locate PAPI headers and library.Output:
Source:
vernier_papi.handvernier_papi.cpp.VERNIER_PAPI_EVENTSenv variable and loaded into anevents_codevector.vernier.cppis gated byevents_code.empty().RegionRecordsobject has a newmetrics_array_telement to store the total PAPI metrics.TraceBackEntryobject has a newmetrics_vector_telement (vector ofmetrics_array_t).metrics_vector_tis used to store the metrics if a parallel region is spawned inside the Vernier region.Performance:
metrics_vector_tdata is not copied intoTraceBackEntrybut moved usingstd::move.events_code.empty()is hardcoded totrue.Tests:
test_papi_fp_ops.cppfor single-eventPAPI_FP_OPSunit test.test_papi_cyc_ins.cppfor two-eventPAPI_TOT_CYC+PAPI_TOT_INSunit test.test_papi_tot_ins.cppfor multi-thread, multi-callPAPI_TOT_INSunit test.test-papi-omp-runs.cppas a system test for verifying three OpenMP/profiling patterns (region inside parallel, region wrapping parallel, nested regions).test_proftests.cppby addingGTEST_FLAG(death_test_style, "threadsafe")to three death tests (required when PAPI spawns threads). Without this, the death tests were hanging on the HPC.Extra:
Test Results:
exc:/data/users/michele.guidolin/Vernier/cmake-build-full-tests/./20260430095713VDI:/data/users/michele.guidolin/VSCODE/Vernier/cmake-build-full-tests/20260430101736Linked issues
Closes #201
Type of change
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: