Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Plug memory leaks with tests mpich3-test/rma/linked_list_*.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 8 Jun 2021 13:20:43 +0000 (15:20 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 8 Jun 2021 13:25:37 +0000 (15:25 +0200)
teshsuite/smpi/mpich3-test/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_all.c
teshsuite/smpi/mpich3-test/rma/linked_list_bench_lock_excl.c

index 908dcdd..cd55ee6 100644 (file)
@@ -18,10 +18,9 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
           lockall_dt lockall_dt_flushall lock_dt_flush lockall_dt_flush lockall_dt_flushlocalall lockall_dt_flushlocal  lock_dt_flushlocal 
      strided_acc_onelock strided_get_indexed strided_putget_indexed contention_put contention_putget lockcontention3
      adlb_mimic1 lock_contention_dt acc-loc get_acc_local get_accumulate put_base put_bottom
-     linked_list_bench_lock_all linked_list_bench_lock_excl manyrma2 pscw_ordering rma-contig get-struct
+     manyrma2 pscw_ordering rma-contig get-struct
      rput_local_comp racc_local_comp rget-testall win_shared win_shared_put_flush_get atomic_get)
     # fence_shm fetchandadd_am fetchandadd fetchandadd_tree_am fetchandadd_tree 
-    #  linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall 
     #   mcs-mutex mixedsync mutex_bench  reqops
     # strided_getacc_indexed_shared rget-unlock 
     # win_flavors win_shared_zerobyte win_shared_noncontig win_shared_noncontig_put 
@@ -35,6 +34,15 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
     set_target_properties(${file} PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
   endforeach()
 
+  # These tests use realloc() whose override is currenlty not implemented
+  foreach(file linked_list_bench_lock_all linked_list_bench_lock_excl)
+    # linked_list_bench_lock_shr linked_list linked_list_fop linked_list_lockall
+    add_executable(${file} EXCLUDE_FROM_ALL ${file}.c)
+    add_dependencies(tests ${file})
+    target_link_libraries(${file} simgrid mtest_c)
+    set_target_properties(${file} PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS} -DSMPI_NO_OVERRIDE_MALLOC")
+  endforeach()
+
     add_executable(transpose3_shm EXCLUDE_FROM_ALL transpose3.c)
     add_dependencies(tests transpose3_shm)     
     target_link_libraries(transpose3_shm simgrid mtest_c)
index 1587579..52683c4 100644 (file)
@@ -264,6 +264,7 @@ int main(int argc, char **argv)
     /* Free all the elements in the list */
     for (; my_elems_count > 0; my_elems_count--)
         MPI_Free_mem(my_elems[my_elems_count - 1]);
+    free(my_elems);
 
     MPI_Finalize();
     return 0;
index 1f30b04..b879543 100644 (file)
@@ -267,6 +267,7 @@ int main(int argc, char **argv)
     /* Free all the elements in the list */
     for (; my_elems_count > 0; my_elems_count--)
         MPI_Free_mem(my_elems[my_elems_count - 1]);
+    free(my_elems);
 
     MPI_Finalize();
     return 0;