1 /* Copyright (c) 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_comm, smpi,
10 "Logging specific to SMPI (comm)");
12 typedef struct s_smpi_mpi_communicator {
14 } s_smpi_mpi_communicator_t;
16 MPI_Comm smpi_comm_new(MPI_Group group) {
19 comm = xbt_new(s_smpi_mpi_communicator_t, 1);
21 smpi_group_use(comm->group);
25 void smpi_comm_destroy(MPI_Comm comm) {
26 smpi_group_destroy(comm->group);
30 MPI_Group smpi_comm_group(MPI_Comm comm) {
34 int smpi_comm_size(MPI_Comm comm) {
35 return smpi_group_size(smpi_comm_group(comm));
38 int smpi_comm_rank(MPI_Comm comm) {
39 return smpi_group_rank(smpi_comm_group(comm), smpi_process_index());