Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Free memory.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 10 Dec 2019 15:23:35 +0000 (16:23 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 12 Dec 2019 09:47:04 +0000 (10:47 +0100)
teshsuite/smpi/mpich3-test/pt2pt/dtype_send.c

index a218e8c..53e8033 100644 (file)
@@ -52,6 +52,7 @@ int main(int argc, char **argv)
         MPI_Waitall(NUM_LOOPS, req, MPI_STATUSES_IGNORE);
 
     MPI_Barrier(MPI_COMM_WORLD);
+    free(req);
 
     /* test issends */
     MPI_Type_create_indexed_block(count, 1, displs, MPI_INT, &newtype);
@@ -71,6 +72,7 @@ int main(int argc, char **argv)
         MPI_Waitall(NUM_LOOPS, req, MPI_STATUSES_IGNORE);
 
     MPI_Barrier(MPI_COMM_WORLD);
+    free(req);
 
     /* test irsends */
     MPI_Type_create_indexed_block(count, 1, displs, MPI_INT, &newtype);
@@ -91,6 +93,8 @@ int main(int argc, char **argv)
     MPI_Waitall(NUM_LOOPS, req, MPI_STATUSES_IGNORE);
 
     MPI_Barrier(MPI_COMM_WORLD);
+    free(req);
+    free(displs);
 
     MPI_Finalize();