Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / src / smpi / colls / alltoallv-ompi-basic-linear.c
index f90471d..c4218e8 100644 (file)
@@ -1,6 +1,10 @@
+/* Copyright (c) 2013-2014. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "colls_private.h"
-#define MCA_COLL_BASE_TAG_ALLTOALLV 111
 /*  
  * Linear functions are copied from the basic coll module.  For
  * some small number of nodes and/or small data sizes they are just as
@@ -57,7 +61,7 @@ smpi_coll_tuned_alltoallv_ompi_basic_linear(void *sbuf, int *scounts, int *sdisp
         prcv = ((char *) rbuf) + (rdisps[i] * rext);
 
         *preq = smpi_irecv_init(prcv, rcounts[i], rdtype,
-                                      i, MCA_COLL_BASE_TAG_ALLTOALLV, comm
+                                      i, COLL_TAG_ALLTOALLV, comm
                                       );
         preq++;
         ++nreqs;
@@ -72,7 +76,7 @@ smpi_coll_tuned_alltoallv_ompi_basic_linear(void *sbuf, int *scounts, int *sdisp
 
         psnd = ((char *) sbuf) + (sdisps[i] * sext);
         *preq=smpi_isend_init(psnd, scounts[i], sdtype,
-                                      i, MCA_COLL_BASE_TAG_ALLTOALLV, comm
+                                      i, COLL_TAG_ALLTOALLV, comm
                                       );
         preq++;
         ++nreqs;
@@ -94,6 +98,7 @@ smpi_coll_tuned_alltoallv_ompi_basic_linear(void *sbuf, int *scounts, int *sdisp
     for (i = 0; i < nreqs; ++i) {
       if(ireqs[i]!=MPI_REQUEST_NULL)smpi_mpi_request_free(&ireqs[i]);
     }
+    free(ireqs);
 
     return MPI_SUCCESS;
 }