Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove spurious barrier calls in comm creation and win creation.
authorAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 20 Mar 2022 23:36:15 +0000 (00:36 +0100)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Sun, 20 Mar 2022 23:36:51 +0000 (00:36 +0100)
standard allows them but they are not mandatory I think (and slow down mc)

src/smpi/mpi/smpi_comm.cpp
src/smpi/mpi/smpi_win.cpp
teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.tesh

index 84f604d..7e19385 100644 (file)
@@ -55,7 +55,6 @@ Comm::Comm(MPI_Group group, MPI_Topology topo, bool smp, int in_id)
     colls::bcast(&id, 1, MPI_INT, 0, this);
     XBT_DEBUG("Communicator %p has id %d", this, id);
     id_=id;//only set here, as we don't want to change it in the middle of the bcast
-    colls::barrier(this);
   }
 }
 
index 0a34e11..8eb022d 100644 (file)
@@ -70,9 +70,6 @@ Win::Win(void* base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm,
     colls::bcast(&bar_ptr, sizeof(s4u::Barrier*), MPI_BYTE, 0, comm);
     if (rank_ != 0)
       bar_ = s4u::BarrierPtr(bar_ptr);
-    bar_->wait();
-  }else{
-    colls::barrier(comm);
   }
   this->add_f();
 }
index 25c5561..8c55e68 100644 (file)
@@ -18,13 +18,13 @@ $ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -map -ho
 > [0.000000] [smpi/INFO] [rank 13] -> Ginette
 > [0.000000] [smpi/INFO] [rank 14] -> Ginette
 > [0.000000] [smpi/INFO] [rank 15] -> Ginette
-> [0.023780] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed MPI handles:
-> [0.023780] [smpi_utils/INFO] 16 leaked handles of type MPI_Comm at coll-allreduce-with-leaks.c:23
-> [0.023780] [smpi_utils/INFO] 16 leaked handles of type MPI_Group at coll-allreduce-with-leaks.c:23
-> [0.023780] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed buffers:
-> [0.023780] [smpi_utils/INFO] coll-allreduce-with-leaks.c:28: leaked allocations of total size 1504, called 16 times, with minimum size 64 and maximum size 124
-> [0.023780] [smpi_utils/INFO] coll-allreduce-with-leaks.c:27: leaked allocations of total size 1024, called 16 times, each with size 64
-> [0.023780] [smpi_utils/INFO] Memory Usage: Simulated application allocated 2528 bytes during its lifetime through malloc/calloc calls.
+> [0.015765] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed MPI handles:
+> [0.015765] [smpi_utils/INFO] 16 leaked handles of type MPI_Comm at coll-allreduce-with-leaks.c:23
+> [0.015765] [smpi_utils/INFO] 16 leaked handles of type MPI_Group at coll-allreduce-with-leaks.c:23
+> [0.015765] [smpi_utils/INFO] Probable memory leaks in your code: SMPI detected 32 unfreed buffers:
+> [0.015765] [smpi_utils/INFO] coll-allreduce-with-leaks.c:28: leaked allocations of total size 1504, called 16 times, with minimum size 64 and maximum size 124
+> [0.015765] [smpi_utils/INFO] coll-allreduce-with-leaks.c:27: leaked allocations of total size 1024, called 16 times, each with size 64
+> [0.015765] [smpi_utils/INFO] Memory Usage: Simulated application allocated 2528 bytes during its lifetime through malloc/calloc calls.
 > Largest allocation at once from a single process was 124 bytes, at coll-allreduce-with-leaks.c:28. It was called 1 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)