X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c505117d2d46a87d2a637e17f1027f2ca37c3f14..edcc47d7373e2f1bc9ae14bf0dcceb38af59ba2b:/src/smpi/bindings/smpi_pmpi_comm.cpp diff --git a/src/smpi/bindings/smpi_pmpi_comm.cpp b/src/smpi/bindings/smpi_pmpi_comm.cpp index 4775ea2c4f..204207d6fd 100644 --- a/src/smpi/bindings/smpi_pmpi_comm.cpp +++ b/src/smpi/bindings/smpi_pmpi_comm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2018. 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. */ @@ -7,7 +7,7 @@ #include "private.hpp" #include "smpi_comm.hpp" -#include "smpi_process.hpp" +#include "src/smpi/include/smpi_actor.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi); @@ -49,6 +49,18 @@ int PMPI_Comm_get_name (MPI_Comm comm, char* name, int* len) } } +int PMPI_Comm_set_name (MPI_Comm comm, char* name) +{ + if (comm == MPI_COMM_NULL) { + return MPI_ERR_COMM; + } else if (name == nullptr) { + return MPI_ERR_ARG; + } else { + comm->set_name(name); + return MPI_SUCCESS; + } +} + int PMPI_Comm_group(MPI_Comm comm, MPI_Group * group) { if (comm == MPI_COMM_NULL) { @@ -209,6 +221,26 @@ int PMPI_Comm_set_attr (MPI_Comm comm, int comm_keyval, void *attribute_val) return PMPI_Attr_put(comm, comm_keyval, attribute_val); } +int PMPI_Comm_get_info(MPI_Comm comm, MPI_Info* info) +{ + if (comm == MPI_COMM_NULL) { + return MPI_ERR_WIN; + } else { + *info = comm->info(); + return MPI_SUCCESS; + } +} + +int PMPI_Comm_set_info(MPI_Comm comm, MPI_Info info) +{ + if (comm == MPI_COMM_NULL) { + return MPI_ERR_TYPE; + } else { + comm->set_info(info); + return MPI_SUCCESS; + } +} + int PMPI_Comm_delete_attr (MPI_Comm comm, int comm_keyval) { return PMPI_Attr_delete(comm, comm_keyval);