X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e709643ef0c5b61c6c878016c418bffa2b1b20cd..563f95bdac3609c1d784e3efa21cb3976d6abedd:/src/smpi/bindings/smpi_pmpi_op.cpp diff --git a/src/smpi/bindings/smpi_pmpi_op.cpp b/src/smpi/bindings/smpi_pmpi_op.cpp index 8c14f06d5b..e90a6ba99b 100644 --- a/src/smpi/bindings/smpi_pmpi_op.cpp +++ b/src/smpi/bindings/smpi_pmpi_op.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. */ @@ -22,6 +22,8 @@ int PMPI_Op_free(MPI_Op * op) { CHECK_NULL(1, MPI_ERR_ARG, op) CHECK_MPI_NULL(1, MPI_OP_NULL, MPI_ERR_OP, *op) + if((*op)->is_predefined()) + return MPI_ERR_OP; simgrid::smpi::Op::unref(op); *op = MPI_OP_NULL; return MPI_SUCCESS;