From a3de234873f7de62b29b79857136e1ad8656c520 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 4 Apr 2025 03:40:25 -0400 Subject: [PATCH] update valgrind suppressions for Fedora 41 --- tools/valgrind/LLVM.supp | 140 ++++++++++++++++++++++++++++++++++++++ tools/valgrind/MPICH.supp | 40 +++++++++++ tools/valgrind/README | 21 +++++- 3 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 tools/valgrind/LLVM.supp diff --git a/tools/valgrind/LLVM.supp b/tools/valgrind/LLVM.supp new file mode 100644 index 0000000000..84f16ece4f --- /dev/null +++ b/tools/valgrind/LLVM.supp @@ -0,0 +1,140 @@ +{ + LLVM_addOption1 + Memcheck:Leak + match-leak-kinds: reachable + fun:* + fun:* + fun:Allocate + ... + fun:insert + ... + fun:forEachSubCommand + fun:addOption + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* + obj:* +} +{ + LLVM_addOption2 + Memcheck:Leak + match-leak-kinds: reachable + fun:* + fun:* + fun:Allocate + ... + fun:insert + ... + fun:call_init + fun:call_init + fun:_dl_init + fun:forEachSubCommand + fun:addOption + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + LLVM_addOption3 + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:safe_calloc + fun:insert + ... + fun:forEachSubCommand + fun:addOption + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* +} +{ + LLVM_addOption4 + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:safe_calloc + ... + fun:insert + ... + fun:forEachSubCommand + fun:addOption + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* +} +{ + LLVM_insert1 + Memcheck:Leak + match-leak-kinds: reachable + fun:* + fun:* + fun:Allocate + ... + fun:insert + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + LLVM_init1 + Memcheck:Leak + match-leak-kinds: reachable + fun:* + fun:call + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + LLVM_register1 + Memcheck:Leak + match-leak-kinds: reachable + fun:* + fun:* + fun:* + fun:* + fun:* + fun:registerCategory + ... + fun:Option + ... + fun:call_init + fun:call_init + fun:_dl_init + obj:* + obj:* + obj:* + obj:* + obj:* +} diff --git a/tools/valgrind/MPICH.supp b/tools/valgrind/MPICH.supp index 80d46a49c8..55dc246ad5 100644 --- a/tools/valgrind/MPICH.supp +++ b/tools/valgrind/MPICH.supp @@ -81,3 +81,43 @@ fun:PMPI_Init fun:main } +{ + MPICH_MPI_init7 + Memcheck:Param + socketcall.sendto(msg) + fun:__libc_send + fun:send + ... + fun:psmx3_sep_open + ... + fun:PMPI_Init + fun:main +} +{ + MPICH_MPI_init8 + Memcheck:Param + socketcall.sendto(msg) + fun:__libc_send + fun:send + ... + fun:psmx3_sep_close + ... + fun:MPID_Finalize + fun:MPII_Finalize + fun:* + fun:* + fun:PMPI_Finalize + fun:main +} +{ + MPICH_MPI_init9 + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + fun:psmx3_recv_generic + ... + fun:MPIDI_OFI_init_local + ... + fun:PMPI_Init + fun:main +} diff --git a/tools/valgrind/README b/tools/valgrind/README index e62031da9b..c28a9aa417 100644 --- a/tools/valgrind/README +++ b/tools/valgrind/README @@ -5,15 +5,32 @@ and fixing real issues. When using CMake, these are automatically included when running "ctest -T memcheck". To manually add them to do a memory check on running LAMMPS, use a command line like following: -valgrind --show-leak-kinds=all --track-origins=yes \ +valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \ --suppressions=/path/to/lammps/tools/valgrind/OpenMP.supp \ --suppressions=/path/to/lammps/tools/valgrind/OpenMPI.supp \ --suppressions=/path/to/lammps/tools/valgrind/MPICH.supp \ + --suppressions=/path/to/lammps/tools/valgrind/LLVM.supp \ --suppressions=/path/to/lammps/tools/valgrind/Python3.supp \ --suppressions=/path/to/lammps/tools/valgrind/GTest.supp \ --suppressions=/path/to/lammps/tools/valgrind/FlexiBLAS.supp \ --suppressions=/path/to/lammps/tools/valgrind/readline.supp \ lmp -in in.melt -Last update: 2022-08-11 +Or you can create a file $HOME/.valgrindrc with one option per line: +--leak-check=full +--show-leak-kinds=all +--track-origins=yes +--suppressions=/path/to/lammps/tools/valgrind/OpenMP.supp +--suppressions=/path/to/lammps/tools/valgrind/OpenMPI.supp +--suppressions=/path/to/lammps/tools/valgrind/MPICH.supp +--suppressions=/path/to/lammps/tools/valgrind/LLVM.supp +--suppressions=/path/to/lammps/tools/valgrind/GTest.supp +--suppressions=/path/to/lammps/tools/valgrind/FlexiBLAS.supp +--suppressions=/path/to/lammps/tools/valgrind/readline.supp +--suppressions=/path/to/lammps/tools/valgrind/Python3.supp + +These options will be automatically added to the valgrind +command line, so it becomes: valgrind lmp -in in.melt + +Last update: 2025-04-04