From 5d2e3c1a0956ed3e1aa61e41f233edfbbfc0fcc6 Mon Sep 17 00:00:00 2001 From: Jonathan Hu Date: Mon, 16 Jan 2023 17:11:21 -0800 Subject: [PATCH 1/2] Testing: geminga: suppress valgrind perl warnings Valgrind emits leak warnings like MLK ==322== 12 bytes in 1 blocks are definitely lost in loss record 23 of 1,341 ==322== at 0x4C29F73: malloc (vg_replace_malloc.c:309) ==322== by 0x4ECD0E4: Perl_safesysmalloc (in /usr/lib64/perl5/CORE/libperl.so) ==322== by 0x4ECDCD1: Perl_savepv (in /usr/lib64/perl5/CORE/libperl.so) ==322== by 0x4F7132C: Perl_new_collate (in /usr/lib64/perl5/CORE/libperl.so) ==322== by 0x4F7159B: Perl_init_i18nl10n (in /usr/lib64/perl5/CORE/libperl.so) ==322== by 0x4E8133B: perl_construct (in /usr/lib64/perl5/CORE/libperl.so) ==322== by 0x400C4D: ??? (in /usr/bin/perl) ==322== by 0x6177554: (below main) (in /usr/lib64/libc-2.17.so) --- .../drivers/geminga/valgrind_suppressions.txt | 379 ++++++++++++++++++ 1 file changed, 379 insertions(+) diff --git a/cmake/ctest/drivers/geminga/valgrind_suppressions.txt b/cmake/ctest/drivers/geminga/valgrind_suppressions.txt index 0438e0f826f4..54cc3d139269 100644 --- a/cmake/ctest/drivers/geminga/valgrind_suppressions.txt +++ b/cmake/ctest/drivers/geminga/valgrind_suppressions.txt @@ -661,3 +661,382 @@ fun:orterun ... } + +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepvn + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_new_collate + fun:Perl_init_i18nl10n + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_new_numeric + fun:Perl_init_i18nl10n + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_grow + fun:Perl_sv_setpv + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_grow + fun:Perl_sv_setpv + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_grow + fun:Perl_sv_setpvn + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_grow + fun:Perl_sv_setpvn + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_grow + fun:Perl_sv_setpvn + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_find_script + fun:perl_parse + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_sv_vcatpvfn + fun:Perl_vnewSVpvf + fun:Perl_newSVpvf + fun:Perl_pp_gmtime + fun:Perl_runops_standard + fun:perl_run + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:Perl_newSVOP + fun:Perl_yylex + fun:Perl_yyparse + fun:perl_parse + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + fun:Perl_safesysrealloc + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_regexec_flags + fun:Perl_pp_match + fun:Perl_runops_standard + fun:perl_run + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_init_stacks + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_my_cxt_init + fun:boot_DynaLoader + fun:Perl_pp_entersub + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_newATTRSUB_flags + fun:Perl_newATTRSUB + fun:Perl_utilize +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_gv_init_pvn + fun:Perl_gv_fetchpvn_flags + fun:Perl_gv_fetchsv + fun:Perl_sv_2cv + fun:Perl_pp_rv2cv + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_gv_init_pvn + fun:Perl_gv_fetchpvn_flags + fun:Perl_gv_fetchsv + fun:Perl_ck_rvconst + fun:Perl_newUNOP + fun:Perl_yylex + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_gv_init_pvn + fun:Perl_gv_fetchpvn_flags + fun:Perl_gv_fetchsv + fun:Perl_newATTRSUB_flags + fun:Perl_newATTRSUB + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require + fun:Perl_runops_standard +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + fun:Perl_safesysrealloc + fun:Perl_push_scope + fun:Perl_pp_entersub + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_newATTRSUB_flags + fun:Perl_newATTRSUB + fun:Perl_utilize + fun:Perl_yyparse +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:Perl_safesyscalloc + fun:Perl_gv_fetchpvn_flags + fun:Perl_yylex + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_newATTRSUB_flags +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:Perl_newSVOP + fun:Perl_yylex + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_newATTRSUB_flags + fun:Perl_newATTRSUB +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_init_stacks + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:Perl_safesyscalloc + fun:Perl_gv_fetchpvn_flags + fun:Perl_yylex + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_newATTRSUB_flags +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_savepv + fun:Perl_newXS_len_flags + fun:Perl_newCONSTSUB_flags + fun:Perl_gv_init_pvn + fun:Perl_gv_fetchpvn_flags + fun:Perl_gv_fetchsv + fun:Perl_ck_rvconst + fun:Perl_newUNOP + fun:Perl_yylex + fun:Perl_yyparse +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + fun:Perl_safesysrealloc + fun:Perl_savestack_grow + fun:Perl_save_pushptrptr + fun:Perl_yylex + fun:Perl_yyparse + obj:/usr/lib64/perl5/CORE/libperl.so + fun:Perl_pp_require + fun:Perl_runops_standard + fun:Perl_call_sv + fun:Perl_call_list + obj:/usr/lib64/perl5/CORE/libperl.so +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_new_stackinfo + fun:Perl_init_stacks + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:Perl_safesysmalloc + fun:Perl_reentrant_init + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:Perl_safesyscalloc + fun:Perl_more_bodies + fun:Perl_sv_upgrade + fun:Perl_sv_setpv + fun:perl_construct + obj:/usr/bin/perl + fun:(below main) +} From ef0ef8b45df6c1dd4878e3caf6358f0a879f08e0 Mon Sep 17 00:00:00 2001 From: Brian Kelley Date: Tue, 17 Jan 2023 12:15:38 -0700 Subject: [PATCH 2/2] KokkosKernels: fix MIS2 agg determinism, valgrind Patch in KK #1528 and #1530. 1528 fixed MIS2 aggregation being possibly non-deterministic, and fixed valgrind conditional on uninitialized value warnings. 1530 fixed valgrind warnings in EB D1 coloring. --- .../src/graph/impl/KokkosGraph_Distance1Color_impl.hpp | 3 +-- .../src/graph/impl/KokkosGraph_Distance2MIS_impl.hpp | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance1Color_impl.hpp b/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance1Color_impl.hpp index 64873708b5fc..2ababa0a9659 100644 --- a/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance1Color_impl.hpp +++ b/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance1Color_impl.hpp @@ -2299,8 +2299,7 @@ class GraphColor_EB : public GraphColornv); color_temp_work_view_type tentative_color_ban( - Kokkos::view_alloc(Kokkos::WithoutInitializing, "tentative_color_ban"), - this->nv); // views are initialized with zero + "tentative_color_ban", this->nv); // views are initialized with zero // allocate memory for vertex color set shifts. nnz_lno_temp_work_view_t color_set("color_set", this->nv); // initialized with zero. diff --git a/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance2MIS_impl.hpp b/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance2MIS_impl.hpp index 195d08dc0ac3..ca7c8e3a8684 100644 --- a/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance2MIS_impl.hpp +++ b/packages/kokkos-kernels/src/graph/impl/KokkosGraph_Distance2MIS_impl.hpp @@ -1117,7 +1117,8 @@ struct D2_MIS_Aggregation { if (neiAgg == agg) connect++; } connectivities_(i) = connect; - } + } else + connectivities_(i) = 0; } lno_t numVerts_; @@ -1224,9 +1225,9 @@ struct D2_MIS_Aggregation { // neighboring aggregate. labels_t labelsOld("old", numVerts); Kokkos::deep_copy(labelsOld, labels); - labels_t connectivities("connect", numVerts); - labels_t aggSizes( - Kokkos::ViewAllocateWithoutInitializing("Phase3 Agg Sizes"), numAggs); + labels_t connectivities(Kokkos::ViewAllocateWithoutInitializing("connect"), + numVerts); + labels_t aggSizes("Phase3 Agg Sizes", numAggs); Kokkos::parallel_for( range_pol(0, numVerts), SizeAndConnectivityFunctor(numVerts, rowmap, entries, labels,