Skip to content

Conversation

@haojiang66
Copy link
Collaborator

new

@zhengly123 zhengly123 changed the base branch from master to dev July 29, 2023 02:41
@zhengly123 zhengly123 mentioned this pull request Jul 30, 2023
Closed
Comment on lines 4 to 12
#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); \
} \
}
Copy link
Collaborator

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.

// and papi_start_counters() in deprecated/pmc.cpp.
int retval = 0;
EventSet = PAPI_NULL;
PAPI_library_init(PAPI_VER_CURRENT);
Copy link
Collaborator

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?

Comment on lines 41 to 43
int *test_data = new int[N];

int test_index[N];
int *test_index = new int[N];
Copy link
Collaborator

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

@haojiang66 haojiang66 requested a review from zhengly123 August 2, 2023 02:00
@zhengly123 zhengly123 changed the title Jyh5 PMU data collection Aug 3, 2023
@haojiang66 haojiang66 closed this Aug 8, 2023
@haojiang66 haojiang66 reopened this Aug 8, 2023
@haojiang66
Copy link
Collaborator Author

stg

@zhengly123 zhengly123 changed the title PMU data collection WIP: PMU data collection Aug 11, 2023
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.

3 participants