From f3565d0016004c352761b726c2a00a1c7338360b Mon Sep 17 00:00:00 2001 From: Daniel Barry Date: Tue, 12 Nov 2024 15:51:40 -0800 Subject: [PATCH 1/3] cat: remove unnecessary cleanup call Remove call that is already invoked. These changes have been tested on the NVIDIA Grace-Hopper architecture. --- src/counter_analysis_toolkit/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/counter_analysis_toolkit/main.c b/src/counter_analysis_toolkit/main.c index 85b4f68b2..b52635dc1 100644 --- a/src/counter_analysis_toolkit/main.c +++ b/src/counter_analysis_toolkit/main.c @@ -82,7 +82,6 @@ int main(int argc, char*argv[]) if(status) { free(params.outputdir); - remove_stock(data); if(READ_FROM_FILE == params.mode) { for(i = 0; i < ct; ++i) From 5a6b1e47181c895e3db14ea65897a83b2be867be Mon Sep 17 00:00:00 2001 From: Daniel Barry Date: Tue, 12 Nov 2024 15:52:40 -0800 Subject: [PATCH 2/3] cat: add newlines to error messages Include newlines for consistency. These changes have been tested on the NVIDIA Grace-Hopper architecture. --- src/counter_analysis_toolkit/eventstock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/counter_analysis_toolkit/eventstock.c b/src/counter_analysis_toolkit/eventstock.c index aab73c261..9da5f0085 100644 --- a/src/counter_analysis_toolkit/eventstock.c +++ b/src/counter_analysis_toolkit/eventstock.c @@ -65,7 +65,7 @@ int build_stock(evstock* stock) } if( 0 == tmp_event_count ){ - fprintf(stderr,"ERROR: CPU component (%s) not found. Exiting.",_PAPI_CPU_COMPONENT_NAME); + fprintf(stderr,"ERROR: CPU component (%s) not found. Exiting.\n",_PAPI_CPU_COMPONENT_NAME); goto gracious_error; } @@ -73,7 +73,7 @@ int build_stock(evstock* stock) ret=PAPI_enum_cmp_event(&event_i,PAPI_ENUM_FIRST,cid); if(ret!=PAPI_OK){ - fprintf(stderr,"ERROR: CPU component does not contain any events. Exiting"); + fprintf(stderr,"ERROR: CPU component does not contain any events. Exiting.\n"); goto gracious_error; } From 4a37c72a11d24e9ba456007bd58a3050d1c418a0 Mon Sep 17 00:00:00 2001 From: Daniel Barry Date: Tue, 12 Nov 2024 18:06:52 -0800 Subject: [PATCH 3/3] cat: remove error return value Since the perf_event component can be disabled, this error message should be removed. These changes have been tested on the NVIDIA Grace-Hopper architecture. --- src/counter_analysis_toolkit/eventstock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/counter_analysis_toolkit/eventstock.c b/src/counter_analysis_toolkit/eventstock.c index 9da5f0085..c929e27e2 100644 --- a/src/counter_analysis_toolkit/eventstock.c +++ b/src/counter_analysis_toolkit/eventstock.c @@ -73,8 +73,7 @@ int build_stock(evstock* stock) ret=PAPI_enum_cmp_event(&event_i,PAPI_ENUM_FIRST,cid); if(ret!=PAPI_OK){ - fprintf(stderr,"ERROR: CPU component does not contain any events. Exiting.\n"); - goto gracious_error; + return 0; } do{