X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1555ef43eee251e5892a2f7fd49bc96e99d68fef..ce127d0b63375027662745650ab4a23a72f70f80:/src/smpi/smpi_pmpi.cpp diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index eb4e4909e9..1315a65ed6 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -47,7 +47,7 @@ int PMPI_Init(int *argc, char ***argv) return MPI_SUCCESS; } -int PMPI_Finalize(void) +int PMPI_Finalize() { smpi_bench_end(); int rank = smpi_process_index(); @@ -128,13 +128,13 @@ int PMPI_Abort(MPI_Comm comm, int errorcode) return MPI_SUCCESS; } -double PMPI_Wtime(void) +double PMPI_Wtime() { return smpi_mpi_wtime(); } extern double sg_maxmin_precision; -double PMPI_Wtick(void) +double PMPI_Wtick() { return sg_maxmin_precision; } @@ -3120,7 +3120,7 @@ int PMPI_Info_create( MPI_Info *info){ if (info == nullptr) return MPI_ERR_ARG; *info = xbt_new(s_smpi_mpi_info_t, 1); - (*info)->info_dict= xbt_dict_new_homogeneous(nullptr); + (*info)->info_dict= xbt_dict_new_homogeneous(xbt_free_f); (*info)->refcount=1; return MPI_SUCCESS; } @@ -3129,7 +3129,7 @@ int PMPI_Info_set( MPI_Info info, char *key, char *value){ if (info == nullptr || key == nullptr || value == nullptr) return MPI_ERR_ARG; - xbt_dict_set(info->info_dict, key, (void*)value, nullptr); + xbt_dict_set(info->info_dict, key, xbt_strdup(value), nullptr); return MPI_SUCCESS; } @@ -3164,13 +3164,13 @@ int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){ if (info == nullptr || newinfo==nullptr) return MPI_ERR_ARG; *newinfo = xbt_new(s_smpi_mpi_info_t, 1); - (*newinfo)->info_dict= xbt_dict_new_homogeneous(nullptr); + (*newinfo)->info_dict= xbt_dict_new_homogeneous(xbt_free_f); (*newinfo)->refcount=1; xbt_dict_cursor_t cursor = nullptr; int *key; void* data; xbt_dict_foreach(info->info_dict,cursor,key,data){ - xbt_dict_set((*newinfo)->info_dict, reinterpret_cast(key), data, nullptr); + xbt_dict_set((*newinfo)->info_dict, reinterpret_cast(key), xbt_strdup(reinterpret_cast(data)), nullptr); } return MPI_SUCCESS; }