-/* 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. */
{
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();
MPI_Comm PMPI_Comm_f2c(MPI_Fint comm){
if(comm==-1)
return MPI_COMM_NULL;
- return static_cast<MPI_Comm>(simgrid::smpi::Comm::f2c(comm));
+ return simgrid::smpi::Comm::f2c(comm);
}
MPI_Fint PMPI_Comm_c2f(MPI_Comm comm){
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;
}