X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fc6767991c724ff1959e982fb2b02e515b65f39a..ec3e4ee5f1a7ffeb96e044057809944f364014e6:/src/smpi/smpi_pmpi.cpp diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index a9927ed300..5a3cd2adcc 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -159,7 +159,7 @@ int PMPI_Type_free(MPI_Datatype * datatype) if (*datatype == MPI_DATATYPE_NULL) { retval = MPI_ERR_ARG; } else { - smpi_datatype_free(datatype); + smpi_datatype_unuse(*datatype); retval = MPI_SUCCESS; } return retval; @@ -718,7 +718,7 @@ int PMPI_Comm_group(MPI_Comm comm, MPI_Group * group) } else { *group = smpi_comm_group(comm); if(*group!= smpi_comm_group(MPI_COMM_WORLD) && *group != MPI_GROUP_NULL - && *group != smpi_comm_group(MPI_COMM_SELF) && *group != MPI_GROUP_EMPTY) + && *group != MPI_GROUP_EMPTY) smpi_group_use(*group); retval = MPI_SUCCESS; } @@ -775,7 +775,7 @@ int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm) *newcomm= MPI_COMM_NULL; retval = MPI_SUCCESS; }else{ - + smpi_group_use(group); *newcomm = smpi_comm_new(group, NULL); retval = MPI_SUCCESS; } @@ -2635,7 +2635,7 @@ int PMPI_Type_create_resized(MPI_Datatype oldtype,MPI_Aint lb, MPI_Aint extent, MPI_Datatype types[3] = { MPI_LB, oldtype, MPI_UB }; s_smpi_mpi_struct_t* subtype = smpi_datatype_struct_create( blocks, disps, 3, types); - smpi_datatype_create(newtype,oldtype->size, lb, lb + extent, 1 , subtype, DT_FLAG_VECTOR); + smpi_datatype_create(newtype,oldtype->size, lb, lb + extent, sizeof(s_smpi_mpi_struct_t) , subtype, DT_FLAG_VECTOR); (*newtype)->flags &= ~DT_FLAG_COMMITED; return MPI_SUCCESS;