Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Display the leaked handles in the tests (using no_loc to hide pointers)
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 3 Apr 2021 07:39:52 +0000 (09:39 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 3 Apr 2021 07:39:52 +0000 (09:39 +0200)
src/smpi/internals/smpi_utils.cpp
teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh
teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh

index 788dac5..1cca1ed 100644 (file)
@@ -149,7 +149,12 @@ void print_memory_analysis()
       if (printed >= n)
         break;
       if (p.first >= simgrid::smpi::F2C::get_num_default_handles()) {
-        XBT_WARN("Leaked handle of type %s at %p", boost::core::demangle(typeid(*(p.second)).name()).c_str(), p.second);
+        if (xbt_log_no_loc) {
+          XBT_WARN("Leaked handle of type %s", boost::core::demangle(typeid(*(p.second)).name()).c_str());
+        } else {
+          XBT_WARN("Leaked handle of type %s at %p", boost::core::demangle(typeid(*(p.second)).name()).c_str(),
+                   p.second);
+        }
         printed++;
       }
     }
index dc83fbc..267c833 100644 (file)
@@ -2,7 +2,7 @@
 ! output sort
 
 p Test allreduce
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --log=smpi_pmpi.thres:error
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --log=smpi_pmpi.thres:error --cfg=smpi/list-leaks:10 --log=no_loc
 > [rank 0] -> Tremblay
 > [rank 1] -> Tremblay
 > [rank 2] -> Tremblay
@@ -24,6 +24,16 @@ $ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -map -ho
 > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information
 > This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary)
 > [0.023768] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n.
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.023768] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
 > [0.023768] [smpi_utils/INFO] Memory Usage: Simulated application allocated 2048 bytes during its lifetime through malloc/calloc calls.
 
 
index 6cf42f3..b2d238b 100644 (file)
@@ -1,28 +1,43 @@
 # Smpi Allreduce collectives tests
-! output sort
 
 p Test allreduce
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --log=smpi_pmpi.thres:error
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --log=smpi_pmpi.thres:error --cfg=smpi/list-leaks:10 --log=no_loc
 > [rank 0] -> Tremblay
 > [rank 1] -> Tremblay
 > [rank 2] -> Tremblay
 > [rank 3] -> Tremblay
+> [0.000000] [mc_safety/INFO] Check a safety property. Reduction is: dpor.
 > [0.000000] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 8 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n.
 > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
 > [0.000000] [smpi_utils/INFO] Memory Usage: Simulated application allocated 128 bytes during its lifetime through malloc/calloc calls.
 > Largest allocation at once from a single process was 16 bytes, at sysdep.h:59. It was called 8 times during the whole simulation.
 > If this is too much, consider sharing allocations for computation buffers.
 > This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary)
->
+> 
 > [0.000000] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 8 unfreed MPI handles : display types and addresses (n max) with --cfg=smpi/list-leaks:n.
 > Running smpirun with -wrapper "valgrind --leak-check=full" can provide more information
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Comm
+> [0.000000] [smpi_utils/WARNING] Leaked handle of type simgrid::smpi::Group
 > [0.000000] [smpi_utils/INFO] Memory Usage: Simulated application allocated 128 bytes during its lifetime through malloc/calloc calls.
 > Largest allocation at once from a single process was 16 bytes, at sysdep.h:59. It was called 8 times during the whole simulation.
 > If this is too much, consider sharing allocations for computation buffers.
 > This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary)
->
-> [0.000000] [mc_safety/INFO] Check a safety property. Reduction is: dpor.
-> [0.000000] [mc_safety/INFO] Executed transitions = 484
-> [0.000000] [mc_safety/INFO] Expanded states = 63
+> 
 > [0.000000] [mc_safety/INFO] No property violation found.
+> [0.000000] [mc_safety/INFO] Expanded states = 63
 > [0.000000] [mc_safety/INFO] Visited states = 500
+> [0.000000] [mc_safety/INFO] Executed transitions = 484