- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider the following minimal working example:
program p
use mpi_f08
call mpi_init(i)
call mpi_finalize(i)
end
The code was compiled with `mpiifx` (`ifx` 2024.2.1 and IntelMPI 2021.13) and the `-fsanitize=address` flag. Running the executable causes a memory leak of 188 bytes in 7 allocations. The allocation sites for 6 of them are unknown, but the remaining one was allocated in `__intel_sse4_strdup` (37 bytes) in `compiler/2024.2/lib/libintlc.so.5`. What's the reason for these leaks?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Internal Allocations by MPI Library: MPI libraries often perform internal allocations for managing communication buffers, handles, and other resources. These allocations might not be cleaned up in a way that AddressSanitizer can track, leading to reports of memory leaks.
- Compiler Runtime Libraries: The Intel Fortran compiler's runtime libraries (like libintlc.so.5) might perform internal allocations for various purposes, such as string handling, error messages, or other runtime support. These allocations might not be freed explicitly, especially if they are intended to persist for the lifetime of the program.
- AddressSanitizer Limitations: AddressSanitizer might not fully understand the lifecycle of certain allocations made by the MPI library or the compiler's runtime. This can result in false positives where AddressSanitizer reports memory leaks that are not actual leaks in the context of the program's execution.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You say, these can be "potential reasons for the leaks", but are you sure these leaks are not actual bugs in the library? I've already found and reported several bugs in the IntelLLVM compiler. Likewise, there is no guarantee that Intel MPI is error-free. Can you check it, if possible?
(By the way, was this answer generated with a chatbot? Some sentences as well as the formatting and the style of bullet lists are identical to the answer I'm getting from ChatGPT by copy-pasting my question.)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page