[mpich-discuss] mpich memory leak?

Jie Chen jiechen at mcs.anl.gov
Fri Jun 8 14:53:47 CDT 2012


Just a small test. Program is the following:

/* file: test.c */
#include <mpi.h>
int main(int argc, char *argv[]) {
   MPI_Init(&argc, &argv);
   MPI_Finalize();
   return 0;
}

-----------------------------------------------------

Compiled using the following command:

>> mpicc test.c

-----------------------------------------------------

Executed with valgrid:

valgrind --leak-check=full --show-reachable=yes mpiexec -n 2 a.out

-----------------------------------------------------

The following is the valgrid output:

==29174== Memcheck, a memory error detector
==29174== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==29174== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for 
copyright info
==29174== Command: mpiexec -n 2 a.out
==29174==
==29174== Warning: ignored attempt to set SIGSTOP handler in sigaction();
==29174==          the SIGSTOP signal is uncatchable
==29174==
==29174== HEAP SUMMARY:
==29174==     in use at exit: 15 bytes in 1 blocks
==29174==   total heap usage: 1,052 allocs, 1,051 frees, 1,744,830 bytes 
allocated
==29174==
==29174== 15 bytes in 1 blocks are still reachable in loss record 1 of 1
==29174==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
==29174==    by 0x410927: ??? (in /usr/bin/mpiexec.hydra)
==29174==    by 0x40205A: ??? (in /usr/bin/mpiexec.hydra)
==29174==    by 0x548AC4C: (below main) (libc-start.c:226)
==29174==
==29174== LEAK SUMMARY:
==29174==    definitely lost: 0 bytes in 0 blocks
==29174==    indirectly lost: 0 bytes in 0 blocks
==29174==      possibly lost: 0 bytes in 0 blocks
==29174==    still reachable: 15 bytes in 1 blocks
==29174==         suppressed: 0 bytes in 0 blocks
==29174==
==29174== For counts of detected and suppressed errors, rerun with: -v
==29174== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)



More information about the mpich-discuss mailing list