scalable-matrix / CA3DMM

Communication-Avoiding 3D Matrix Multiplication
MIT License
7 stars 0 forks source link

Memory Leak with Cartesian Communicator #2

Open AerysL opened 3 years ago

AerysL commented 3 years ago

Observed while checking that #1 was solved:

 mpirun -np 1 valgrind --track-origins=yes --leak-check=full ./example_AB.exe 512 512 512 0 0 1 1

==266577== 5,191 (344 direct, 4,847 indirect) bytes in 1 blocks are definitely lost in loss record 44 of 44 ==266577== at 0x4840B65: calloc (vg_replace_malloc.c:760) ==266577== by 0x59ED3A4: ompi_comm_allocate (in /usr/lib/openmpi/libmpi.so.40.20.5) ==266577== by 0x5A8ABD7: mca_topo_base_cart_create (in /usr/lib/openmpi/libmpi.so.40.20.5) ==266577== by 0x5A22984: PMPI_Cart_create (in /usr/lib/openmpi/libmpi.so.40.20.5) ==266577== by 0x10E2DB: cannon_engine_init (cannon.c:33) ==266577== by 0x10CAA4: ca3dmm_engine_init (ca3dmm.c:176) ==266577== by 0x10ABED: main (example_AB.c:111)

Size of leak can be greater in application (GPU_CAM branch, cpu code)

==271080== 119,267 (7,912 direct, 111,355 indirect) bytes in 23 blocks are definitely lost in loss record 99 of 101 ==271080== at 0x4840B65: calloc (vg_replace_malloc.c:760) ==271080== by 0x57243A4: ompi_comm_allocate (in /usr/lib/openmpi/libmpi.so.40.20.5) ==271080== by 0x57C1BD7: mca_topo_base_cart_create (in /usr/lib/openmpi/libmpi.so.40.20.5) ==271080== by 0x5759984: PMPI_Cart_create (in /usr/lib/openmpi/libmpi.so.40.20.5) ==271080== by 0x112B5D: cannon_engine_init_ex (cannon.c:40) ==271080== by 0x111155: ca3dmm_engine_init_ex (ca3dmm.c:215) ==271080== by 0x10F718: PCE_Subspace_Rotation (libpce.c:922) ==271080== by 0x10D2BB: main (libpce_min_example.c:857) ==271080==