Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused variables.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 14 Jun 2013 07:42:45 +0000 (09:42 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 14 Jun 2013 07:42:45 +0000 (09:42 +0200)
src/smpi/colls/reduce_scatter-mpich.c
src/smpi/colls/smpi_mpich_selector.c

index 7afa471..dbde2e6 100644 (file)
@@ -25,7 +25,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_pair(void *sendbuf, void *recvbuf, int
     int  *disps;
     void *tmp_recvbuf;
     int mpi_errno = MPI_SUCCESS;
     int  *disps;
     void *tmp_recvbuf;
     int mpi_errno = MPI_SUCCESS;
-    int type_size, total_count, nbytes, dst, src;
+    int total_count, dst, src;
     int is_commutative;
     comm_size = smpi_comm_size(comm);
     rank = smpi_comm_rank(comm);
     int is_commutative;
     comm_size = smpi_comm_size(comm);
     rank = smpi_comm_rank(comm);
@@ -49,10 +49,6 @@ int smpi_coll_tuned_reduce_scatter_mpich_pair(void *sendbuf, void *recvbuf, int
         return MPI_ERR_COUNT;
     }
 
         return MPI_ERR_COUNT;
     }
 
-    type_size= smpi_datatype_size(datatype);
-    nbytes = total_count * type_size;
-    
-
         if (sendbuf != MPI_IN_PLACE) {
             /* copy local data into recvbuf */
             smpi_datatype_copy(((char *)sendbuf+disps[rank]*extent),
         if (sendbuf != MPI_IN_PLACE) {
             /* copy local data into recvbuf */
             smpi_datatype_copy(((char *)sendbuf+disps[rank]*extent),
@@ -264,7 +260,7 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r
     int  *disps;
     void *tmp_recvbuf, *tmp_results;
     int mpi_errno = MPI_SUCCESS;
     int  *disps;
     void *tmp_recvbuf, *tmp_results;
     int mpi_errno = MPI_SUCCESS;
-    int type_size, dis[2], blklens[2], total_count, nbytes, dst;
+    int dis[2], blklens[2], total_count, dst;
     int mask, dst_tree_root, my_tree_root, j, k;
     int received;
     MPI_Datatype sendtype, recvtype;
     int mask, dst_tree_root, my_tree_root, j, k;
     int received;
     MPI_Datatype sendtype, recvtype;
@@ -287,10 +283,6 @@ int smpi_coll_tuned_reduce_scatter_mpich_rdb(void *sendbuf, void *recvbuf, int r
         total_count += recvcounts[i];
     }
     
         total_count += recvcounts[i];
     }
     
-    type_size= smpi_datatype_size(datatype);
-    nbytes = total_count * type_size;
-    
-
             /* noncommutative and (non-pof2 or block irregular), use recursive doubling. */
 
             /* need to allocate temporary buffer to receive incoming data*/
             /* noncommutative and (non-pof2 or block irregular), use recursive doubling. */
 
             /* need to allocate temporary buffer to receive incoming data*/
index c956135..c81e2f2 100644 (file)
@@ -424,20 +424,15 @@ int smpi_coll_tuned_reduce_scatter_mpich( void *sbuf, void *rbuf,
                                                     )
 {
     int comm_size, i;
                                                     )
 {
     int comm_size, i;
-    size_t total_message_size, dsize;
-    int zerocounts = 0;
+    size_t total_message_size;
 
     XBT_DEBUG("smpi_coll_tuned_reduce_scatter_mpich");
     
     comm_size = smpi_comm_size(comm);
     // We need data size for decision function 
 
     XBT_DEBUG("smpi_coll_tuned_reduce_scatter_mpich");
     
     comm_size = smpi_comm_size(comm);
     // We need data size for decision function 
-    dsize=smpi_datatype_size(dtype);
     total_message_size = 0;
     for (i = 0; i < comm_size; i++) { 
         total_message_size += rcounts[i];
     total_message_size = 0;
     for (i = 0; i < comm_size; i++) { 
         total_message_size += rcounts[i];
-        if (0 == rcounts[i]) {
-            zerocounts = 1;
-        }
     }
 
     if( smpi_op_is_commute(op) &&  total_message_size > 524288) { 
     }
 
     if( smpi_op_is_commute(op) &&  total_message_size > 524288) {