Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
give correct pointer when calling delete function
authorAugustin Degomme <augustin.degomme@imag.fr>
Mon, 6 Oct 2014 12:28:00 +0000 (14:28 +0200)
committerAugustin Degomme <augustin.degomme@imag.fr>
Mon, 6 Oct 2014 12:28:00 +0000 (14:28 +0200)
src/smpi/smpi_comm.c
src/smpi/smpi_mpi_dt.c

index add045f..2e3bf4f 100644 (file)
@@ -545,7 +545,7 @@ int smpi_comm_attr_delete(MPI_Comm comm, int keyval){
     void * value;
     int flag;
     if(smpi_comm_attr_get(comm, keyval, &value, &flag)==MPI_SUCCESS){
     void * value;
     int flag;
     if(smpi_comm_attr_get(comm, keyval, &value, &flag)==MPI_SUCCESS){
-      int ret = elem->delete_fn(comm, keyval, &value, &flag);
+      int ret = elem->delete_fn(comm, keyval, value, &flag);
       if(ret!=MPI_SUCCESS) return ret;
     }
   }  
       if(ret!=MPI_SUCCESS) return ret;
     }
   }  
@@ -592,7 +592,7 @@ int smpi_comm_attr_put(MPI_Comm comm, int keyval, void* attr_value){
   void* value;
   smpi_comm_attr_get(comm, keyval, &value, &flag);
   if(flag && elem->delete_fn!=MPI_NULL_DELETE_FN){
   void* value;
   smpi_comm_attr_get(comm, keyval, &value, &flag);
   if(flag && elem->delete_fn!=MPI_NULL_DELETE_FN){
-    int ret = elem->delete_fn(comm, keyval, &value, &flag);
+    int ret = elem->delete_fn(comm, keyval, value, &flag);
     if(ret!=MPI_SUCCESS) return ret;
   }
   if(comm->attributes==NULL)
     if(ret!=MPI_SUCCESS) return ret;
   }
   if(comm->attributes==NULL)
index d7f0fc9..c5e93f3 100644 (file)
@@ -412,7 +412,7 @@ void smpi_datatype_free(MPI_Datatype* type){
       xbt_dict_foreach((*type)->attributes, cursor, key, value){
         smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)key);
         if(elem &&  elem->delete_fn)
       xbt_dict_foreach((*type)->attributes, cursor, key, value){
         smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)key);
         if(elem &&  elem->delete_fn)
-          elem->delete_fn(*type, atoi((const char*)key), &value, &flag);
+          elem->delete_fn(*type, atoi((const char*)key), value, &flag);
       }
   }
 
       }
   }
 
@@ -1679,7 +1679,7 @@ int smpi_type_attr_delete(MPI_Datatype type, int keyval){
     void * value;
     int flag;
     if(smpi_type_attr_get(type, keyval, &value, &flag)==MPI_SUCCESS){
     void * value;
     int flag;
     if(smpi_type_attr_get(type, keyval, &value, &flag)==MPI_SUCCESS){
-      int ret = elem->delete_fn(type, keyval, &value, &flag);
+      int ret = elem->delete_fn(type, keyval, value, &flag);
       if(ret!=MPI_SUCCESS) return ret;
     }
   }  
       if(ret!=MPI_SUCCESS) return ret;
     }
   }  
@@ -1726,7 +1726,7 @@ int smpi_type_attr_put(MPI_Datatype type, int keyval, void* attr_value){
   void* value;
   smpi_type_attr_get(type, keyval, &value, &flag);
   if(flag && elem->delete_fn!=MPI_NULL_DELETE_FN){
   void* value;
   smpi_type_attr_get(type, keyval, &value, &flag);
   if(flag && elem->delete_fn!=MPI_NULL_DELETE_FN){
-    int ret = elem->delete_fn(type, keyval, &value, &flag);
+    int ret = elem->delete_fn(type, keyval, value, &flag);
     if(ret!=MPI_SUCCESS) return ret;
   }
   if(type->attributes==NULL)
     if(ret!=MPI_SUCCESS) return ret;
   }
   if(type->attributes==NULL)