Skip to content

Commit

Permalink
Debugging latest PAPI hip/rocm counter support on crusher, fixing bug…
Browse files Browse the repository at this point in the history
…s with initializing the event set with the rocm component. With 5.2, all hardware counters should work.
  • Loading branch information
khuck committed Jul 22, 2022
1 parent 7b3e64f commit 8ae1fc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/apex/profiler_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1479,15 +1479,18 @@ if (rc != 0) cout << "PAPI error! " << name << ": " << PAPI_strerror(rc) << endl
std::string name = c.first;
auto metrics = c.second;
//std::cout << "Getting metrics for " << name << std::endl;

if (name.compare("PAPI") != 0 && !first_time) {
// skip this component on this thread - will be meaningless!
continue;
}
int EventSet = PAPI_NULL;
CALL_PAPI_OK(PAPI_create_eventset(&EventSet));
if (name.compare("PAPI") == 0) {
CALL_PAPI_OK(PAPI_assign_eventset_component(EventSet, 0));
} else {
int index = component_index_map[name];
//std::cout << "Setting component index: " << index << std::endl;
CALL_PAPI_OK(PAPI_assign_eventset_component(EventSet, index));
//CALL_PAPI_OK(PAPI_assign_eventset_component(EventSet, index));
}
int code;
// iterate over the counter names in the vector
Expand Down
1 change: 1 addition & 0 deletions src/scripts/apex_exec
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ eval set -- "${PARAMS}"

export APEX_POLICY=1
export HARMONY_HOME="@ACTIVEHARMONY_ROOT@"
export PAPI_ROCM_ROOT=@ROCM_ROOT@

# Detect our MPI rank!
if [ ! -z ${PMI_RANK+x} ] ; then
Expand Down

0 comments on commit 8ae1fc0

Please sign in to comment.