X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/911fe67a4769690da6e71d578e3bf358a6285076..f00ffb4ea8272126f9a81ec6b8adc6e021182bde:/src/smpi/smpi_pmpi.cpp diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index abc914ce4a..22637d7489 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -1654,11 +1654,11 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c dt_size_send = smpi_datatype_size(datatype); extra->send_size = count*dt_size_send; TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra); - + if(smpi_comm_size(comm)>1) mpi_coll_bcast_fun(buf, count, datatype, root, comm); - retval = MPI_SUCCESS; + retval = MPI_SUCCESS; - TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__); + TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__); } smpi_bench_begin(); @@ -2705,6 +2705,7 @@ int PMPI_Win_get_group(MPI_Win win, MPI_Group * group){ retval = MPI_ERR_WIN; }else { smpi_mpi_win_get_group(win, group); + smpi_group_use(*group); } return retval; } @@ -3166,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){ + memset(value, 0, valuelen); memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < static_cast(valuelen)) ? strlen(tmpvalue) + 1 : valuelen); *flag=true; } @@ -3177,6 +3179,7 @@ int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){ return MPI_ERR_ARG; *newinfo = xbt_new(s_smpi_mpi_info_t, 1); (*newinfo)->info_dict= xbt_dict_new_homogeneous(NULL); + (*newinfo)->refcount=1; xbt_dict_cursor_t cursor = NULL; int *key; void* data;