X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43f7ca1cac5ab1858e318fdd6239d0a0c3b3d893..061f1e9720921cc227dab4f6ddeca9d30028e5d4:/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 013b78007e..505914e412 100644 --- a/src/smpi/bindings/smpi_pmpi_op.cpp +++ b/src/smpi/bindings/smpi_pmpi_op.cpp @@ -1,15 +1,14 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. 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. */ -#include "private.h" +#include "private.hpp" #include "smpi_op.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); /* PMPI User level calls */ -extern "C" { // Obviously, the C MPI interface should use the C linkage int PMPI_Op_create(MPI_User_function * function, int commute, MPI_Op * op) { @@ -28,7 +27,7 @@ int PMPI_Op_free(MPI_Op * op) } else if (*op == MPI_OP_NULL) { return MPI_ERR_OP; } else { - delete (*op); + simgrid::smpi::Op::unref(op); *op = MPI_OP_NULL; return MPI_SUCCESS; } @@ -52,5 +51,3 @@ MPI_Op PMPI_Op_f2c(MPI_Fint op){ MPI_Fint PMPI_Op_c2f(MPI_Op op){ return op->c2f(); } - -}