X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6..cfbf3bda3a828313326d322fa92fb6719904d1a4:/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 85dd53aa74..005799957e 100644 --- a/src/smpi/bindings/smpi_pmpi_comm.cpp +++ b/src/smpi/bindings/smpi_pmpi_comm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -127,6 +127,8 @@ int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out) { CHECK_NULL(4, MPI_ERR_ARG, comm_out) CHECK_COMM2(1, comm) + if( color != MPI_UNDEFINED)//we use a negative value for MPI_UNDEFINED + CHECK_NEGATIVE(3, MPI_ERR_ARG, color) smpi_bench_end(); *comm_out = comm->split(color, key); smpi_bench_begin(); @@ -157,7 +159,7 @@ int PMPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int, MPI_Comm* comm_o MPI_Comm PMPI_Comm_f2c(MPI_Fint comm){ if(comm==-1) return MPI_COMM_NULL; - return static_cast(simgrid::smpi::Comm::f2c(comm)); + return simgrid::smpi::Comm::f2c(comm); } MPI_Fint PMPI_Comm_c2f(MPI_Comm comm){ @@ -273,6 +275,7 @@ int PMPI_Errhandler_free(MPI_Errhandler* errhandler){ int PMPI_Errhandler_create(MPI_Handler_function* function, MPI_Errhandler* errhandler){ CHECK_NULL(2, MPI_ERR_ARG, errhandler) *errhandler=new simgrid::smpi::Errhandler(function); + (*errhandler)->add_f(); return MPI_SUCCESS; }