-
Notifications
You must be signed in to change notification settings - Fork 5
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
WIP: PMU data collection #4
base: dev
Are you sure you want to change the base?
Conversation
src/CollectorPapi.cc
Outdated
#define checkPapi(call,stdpapi) \ | ||
{ \ | ||
auto err = call; \ | ||
if (stdpapi != err) { \ | ||
fprintf(stderr, "PAPI error in %s:%i : %s.\n", __FILE__, __LINE__, \ | ||
PAPI_strerror(retval)); \ | ||
exit(EXIT_FAILURE); \ | ||
} \ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro is already defined in include/collector_papi.h
. This overload with two paramters seems to be seldom used as most of the return values are PAPI_OK
. I suggest using the original papiCheck
without a custom return value.
src/CollectorPapi.cc
Outdated
// and papi_start_counters() in deprecated/pmc.cpp. | ||
int retval = 0; | ||
EventSet = PAPI_NULL; | ||
PAPI_library_init(PAPI_VER_CURRENT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the return value?
test/test_collector.cc
Outdated
int *test_data = new int[N]; | ||
|
||
int test_index[N]; | ||
int *test_index = new int[N]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use vector
or shared_ptr
stg |
new