From 6cad7d210b3f4ba76de1c78533c5321915def92b Mon Sep 17 00:00:00 2001 From: Aurelien Bouteiller Date: Thu, 22 Jun 2023 14:05:09 -0400 Subject: [PATCH 1/2] Use new feature parsec_devices_print_stats to print per-tp stats if verbose >=4 Signed-off-by: Aurelien Bouteiller --- tests/common.c | 4 ++++ tests/common.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/tests/common.c b/tests/common.c index 78a3d865..3d78ec0b 100644 --- a/tests/common.c +++ b/tests/common.c @@ -67,6 +67,8 @@ double time_elapsed = 0.0; double sync_time_elapsed = 0.0; double alpha = 1.; +uint64_t *dev_stats = NULL; + /********************************** * Command line arguments **********************************/ @@ -734,6 +736,8 @@ void cleanup_parsec(parsec_context_t* parsec, int *iparam) parsec_info_unregister(&parsec_per_stream_infos, CuHI, NULL); #endif + if(NULL != dev_stats) parsec_devices_free_statistics(&dev_stats); + parsec_fini(&parsec); #ifdef PARSEC_HAVE_MPI diff --git a/tests/common.h b/tests/common.h index 6c3d23e9..c51a3711 100644 --- a/tests/common.h +++ b/tests/common.h @@ -35,6 +35,7 @@ extern char *PARSEC_SCHED_NAME[]; extern int unix_timestamp; extern char cwd[]; +extern uint64_t *dev_stats; /* Update PASTE_CODE_PROGRESS_KERNEL below if you change this list */ enum iparam_t { @@ -231,6 +232,7 @@ static inline int min(int a, int b) { return a < b ? a : b; } PROFILING_SAVE_iINFO("PARAM_SCHEDULER", iparam[IPARAM_SCHEDULER]); #define PASTE_CODE_PROGRESS_KERNEL(PARSEC, KERNEL) \ + parsec_devices_save_statistics(&dev_stats); \ SYNC_TIME_START(); \ PARSEC_CHECK_ERROR(parsec_context_start(PARSEC), "parsec_context_start"); \ TIME_START(); \ @@ -239,6 +241,7 @@ static inline int min(int a, int b) { return a < b ? a : b; } P, Q, gpus, NB, N, \ gflops=(flops/1e9)/sync_time_elapsed)); \ PASTE_PROF_INFO; \ + if(loud >= 4) parsec_devices_print_statistics(PARSEC, dev_stats); \ if(loud >= 5 && rank == 0) { \ printf("\n" \ @@ -246,6 +249,7 @@ static inline int min(int a, int b) { return a < b ? a : b; } "\n", \ gflops); \ } \ + if(rank==0) fflush(stdout); \ (void)gflops; @@ -254,6 +258,7 @@ static inline int min(int a, int b) { return a < b ? a : b; } parsec_taskpool_t* PARSEC_##KERNEL = dplasma_##KERNEL##_New PARAMS; \ PARSEC_CHECK_ERROR(parsec_context_add_taskpool(PARSEC, PARSEC_##KERNEL), "parsec_context_add_taskpool");\ SYNC_TIME_STOP(); \ + parsec_devices_save_statistics(&dev_stats); \ double stime_A = sync_time_elapsed; \ SYNC_TIME_START(); \ PARSEC_CHECK_ERROR(parsec_context_start(PARSEC), "parsec_context_start");\ @@ -276,6 +281,7 @@ static inline int min(int a, int b) { return a < b ? a : b; } stime_A,stime_C); \ } \ PASTE_PROF_INFO; \ + if(loud >= 4) parsec_devices_print_statistics(PARSEC, dev_stats); \ if(loud >= 5 && rank == 0) { \ printf("\n" \ From 0d1e9e7524cc618de3db3dfb032d2716c06df541 Mon Sep 17 00:00:00 2001 From: Aurelien Bouteiller Date: Wed, 31 Jan 2024 13:22:58 -0500 Subject: [PATCH 2/2] Update parsec submodule tracker for a version with per-tp-stats --- parsec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsec b/parsec index e718c6cf..adabbd4d 160000 --- a/parsec +++ b/parsec @@ -1 +1 @@ -Subproject commit e718c6cfd0a6d7f5c8431cba305a3fc138200585 +Subproject commit adabbd4d1fb580358a32d489df19fa9c05a316e1