X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a821dea495f4a5d0087871302e4d21ee3ba9b61f..c4000f89d4644c3d7ff6187a62a0930c4d53e683:/src/smpi/bindings/smpi_pmpi_comm.cpp diff --git a/src/smpi/bindings/smpi_pmpi_comm.cpp b/src/smpi/bindings/smpi_pmpi_comm.cpp index f0f2ed449a..4775ea2c4f 100644 --- a/src/smpi/bindings/smpi_pmpi_comm.cpp +++ b/src/smpi/bindings/smpi_pmpi_comm.cpp @@ -101,7 +101,7 @@ int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm * newcomm) return MPI_ERR_GROUP; } else if (newcomm == nullptr) { return MPI_ERR_ARG; - } else if(group->rank(simgrid::s4u::Actor::self()->getPid())==MPI_UNDEFINED){ + } else if (group->rank(simgrid::s4u::this_actor::get_pid()) == MPI_UNDEFINED) { *newcomm= MPI_COMM_NULL; return MPI_SUCCESS; }else{ @@ -156,6 +156,24 @@ int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out) return retval; } +int PMPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm) +{ + int retval = 0; + smpi_bench_end(); + + if (newcomm == nullptr) { + retval = MPI_ERR_ARG; + } else if (comm == MPI_COMM_NULL) { + retval = MPI_ERR_COMM; + } else { + *newcomm = comm->split_type(split_type, key, info); + retval = MPI_SUCCESS; + } + smpi_bench_begin(); + + return retval; +} + int PMPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int, MPI_Comm* comm_out) { int retval = 0;