-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2020. 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. */
||keyval == MPI_UNIVERSE_SIZE||keyval == MPI_LASTUSEDCODE)
return MPI_ERR_ARG;
else
- return comm->attr_put<simgrid::smpi::Comm>(keyval, attr_value);
+ return comm->attr_put<simgrid::smpi::Comm>(keyval, attr_value);
}
int PMPI_Errhandler_free(MPI_Errhandler* errhandler){
int PMPI_Comm_call_errhandler(MPI_Comm comm,int errorcode){
CHECK_COMM(1)
- comm->errhandler()->call(comm, errorcode);
+ MPI_Errhandler err = comm->errhandler();
+ err->call(comm, errorcode);
+ simgrid::smpi::Errhandler::unref(err);
return MPI_SUCCESS;
}