1 /* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
9 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
11 /* PMPI User level calls */
12 extern "C" { // Obviously, the C MPI interface should use the C linkage
14 int PMPI_Op_create(MPI_User_function * function, int commute, MPI_Op * op)
16 if (function == nullptr || op == nullptr) {
19 *op = new simgrid::smpi::Op(function, (commute!=0));
24 int PMPI_Op_free(MPI_Op * op)
28 } else if (*op == MPI_OP_NULL) {
37 int PMPI_Op_commutative(MPI_Op op, int* commute){
38 if (op == MPI_OP_NULL) {
40 } else if (commute==nullptr){
43 *commute = op->is_commutative();
48 MPI_Op PMPI_Op_f2c(MPI_Fint op){
49 return static_cast<MPI_Op>(simgrid::smpi::Op::f2c(op));
52 MPI_Fint PMPI_Op_c2f(MPI_Op op){