source: XIOS/dev/branch_openmp/extern/src_ep_dev/ep_size.cpp @ 2146

Last change on this file since 2146 was 1539, checked in by yushan, 6 years ago

update intercomm_merge and remove redundant files

File size: 908 bytes
RevLine 
[1134]1#include "ep_lib.hpp"
2#include <mpi.h>
3#include "ep_declaration.hpp"
[1354]4#include "ep_mpi.hpp"
[1134]5
6namespace ep_lib
7{
8
9  int MPI_Comm_size(MPI_Comm comm, int* size)
10  {
[1520]11    if(comm->is_ep)
[1134]12    {
[1520]13      Debug("MPI_Comm_size with EP");
14      return *size = comm->ep_comm_ptr->size_rank_info[0].second;
[1134]15    }
16
[1520]17    return MPI_Comm_size_mpi(comm, size);
[1134]18  }
19
20  int MPI_Comm_remote_size(MPI_Comm comm, int *size)
21  {
[1520]22    if(comm->is_ep)
[1134]23    {
[1539]24      return *size = comm->is_intercomm? comm->inter_rank_map->size() : 0;
[1134]25    }
[1520]26    return MPI_Comm_remote_size_mpi(comm, size);
[1134]27  }
[1520]28
29
30  int MPI_Comm_size_mpi(MPI_Comm comm, int* size)
31  {
32    Debug("MPI_Comm_size with MPI");
33    return ::MPI_Comm_size(to_mpi_comm(comm->mpi_comm), size);
34  }
35
36  int MPI_Comm_remote_size_mpi(MPI_Comm comm, int *size)
37  {
38    Debug("MPI_Comm_remote_size with MPI");
39    return ::MPI_Comm_remote_size(to_mpi_comm(comm->mpi_comm), size);
40  }
41
[1134]42}
43
44
Note: See TracBrowser for help on using the repository browser.