Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Yet another batch of fixes
authordegomme <augustin.degomme@unibas.ch>
Sat, 30 Apr 2016 00:30:04 +0000 (02:30 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Sat, 30 Apr 2016 00:30:04 +0000 (02:30 +0200)
src/smpi/colls/bcast-mvapich-smp.c
src/smpi/smpi_base.cpp
src/smpi/smpi_comm.cpp
src/smpi/smpi_f77.cpp
src/smpi/smpi_pmpi.cpp
tools/simgrid.supp

index 8dd8594..54ea0fc 100644 (file)
@@ -238,7 +238,8 @@ int smpi_coll_tuned_bcast_mvapich2_knomial_intra_node(void *buffer,
             mask /= mv2_intra_node_knomial_factor;
         }
     }
             mask /= mv2_intra_node_knomial_factor;
         }
     }
-
+    xbt_free(reqarray);
+    xbt_free(starray);
     return mpi_errno;
 }
 
     return mpi_errno;
 }
 
index 82cc5a9..e892f89 100644 (file)
@@ -1306,10 +1306,7 @@ void smpi_mpi_reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
   void **tmpbufs;
 
   char* sendtmpbuf = (char*) sendbuf;
   void **tmpbufs;
 
   char* sendtmpbuf = (char*) sendbuf;
-  if( sendbuf == MPI_IN_PLACE ) {
-    sendtmpbuf = (char *)smpi_get_tmp_sendbuffer(count*smpi_datatype_get_extent(datatype));
-    smpi_datatype_copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
-  }
+
 
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
 
   rank = smpi_comm_rank(comm);
   size = smpi_comm_size(comm);
@@ -1318,6 +1315,11 @@ void smpi_mpi_reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
     smpi_coll_tuned_reduce_ompi_basic_linear(sendtmpbuf, recvbuf, count, datatype, op, root, comm);
     return;
   }
     smpi_coll_tuned_reduce_ompi_basic_linear(sendtmpbuf, recvbuf, count, datatype, op, root, comm);
     return;
   }
+
+  if( sendbuf == MPI_IN_PLACE ) {
+    sendtmpbuf = (char *)smpi_get_tmp_sendbuffer(count*smpi_datatype_get_extent(datatype));
+    smpi_datatype_copy(recvbuf, count, datatype,sendtmpbuf, count, datatype);
+  }
   
   if(rank != root) {
     // Send buffer to root
   
   if(rank != root) {
     // Send buffer to root
index c7a50b4..3513ba6 100644 (file)
@@ -325,6 +325,7 @@ void smpi_comm_cleanup_attributes(MPI_Comm comm){
       if(elem &&  elem->delete_fn)
         elem->delete_fn(comm, *key, value, &flag);
     }
       if(elem &&  elem->delete_fn)
         elem->delete_fn(comm, *key, value, &flag);
     }
+    xbt_dict_free(&comm->attributes);
   }
 }
 
   }
 }
 
index 9b2aaac..09cb210 100644 (file)
@@ -787,9 +787,15 @@ void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, i
  tkey[keylen]='\0';
  *ierr = MPI_Info_get(smpi_info_f2c(*info),tkey,*valuelen, value, flag);
  xbt_free(tkey);
  tkey[keylen]='\0';
  *ierr = MPI_Info_get(smpi_info_f2c(*info),tkey,*valuelen, value, flag);
  xbt_free(tkey);
- int i = 0;
- for (i=strlen(value); i<*valuelen; i++)
- value[i]=' ';
+ if(*flag==true){
+   int replace=0, i=0;
+   for (i=0; i<*valuelen; i++){
+     if(value[i]=='\0')
+       replace=1;
+     if(replace)
+       value[i]=' ';
+   }
+ } 
 }
 
 void mpi_info_free_(int* info, int* ierr){
 }
 
 void mpi_info_free_(int* info, int* ierr){
index ad2111a..22637d7 100644 (file)
@@ -3167,6 +3167,7 @@ int PMPI_Info_get(MPI_Info info,char *key,int valuelen, char *value, int *flag){
     return MPI_ERR_INFO_VALUE;
   char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
   if(tmpvalue){
     return MPI_ERR_INFO_VALUE;
   char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
   if(tmpvalue){
+    memset(value, 0, valuelen);
     memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < static_cast<size_t>(valuelen)) ? strlen(tmpvalue) + 1 : valuelen);
     *flag=true;
   }
     memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < static_cast<size_t>(valuelen)) ? strlen(tmpvalue) + 1 : valuelen);
     *flag=true;
   }
index 2c3e47b..ce06e6b 100644 (file)
@@ -67,7 +67,6 @@
 {
    Memory leak in Netcards
    Memcheck:Leak
 {
    Memory leak in Netcards
    Memcheck:Leak
-   match-leak-kinds: definite
    ...
    fun:sg_platf_new_router
    fun:STag_surfxml_router
    ...
    fun:sg_platf_new_router
    fun:STag_surfxml_router
@@ -75,8 +74,6 @@
    ...
    fun:parse_platform_file
    fun:SIMIX_create_environment
    ...
    fun:parse_platform_file
    fun:SIMIX_create_environment
-   fun:smpi_main
-   fun:main
 }
 
 {
 }
 
 {