Last change
on this file since 2354 was
1651,
checked in by yushan, 5 years ago
|
dev on EP for tracing with itac. Tested on ADA with test_omp
|
File size:
930 bytes
|
Rev | Line | |
---|
[1651] | 1 | #ifdef _usingEP |
---|
| 2 | #include "ep_lib.hpp" |
---|
| 3 | #include <mpi.h> |
---|
| 4 | #include "ep_declaration.hpp" |
---|
| 5 | #include "ep_mpi.hpp" |
---|
| 6 | |
---|
| 7 | namespace ep_lib |
---|
| 8 | { |
---|
| 9 | |
---|
| 10 | int MPI_Comm_size(MPI_Comm comm, int* size) |
---|
| 11 | { |
---|
| 12 | if(comm->is_ep) |
---|
| 13 | { |
---|
| 14 | Debug("MPI_Comm_size with EP"); |
---|
| 15 | return *size = comm->ep_comm_ptr->size_rank_info[0].second; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | return MPI_Comm_size_mpi(comm, size); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | int MPI_Comm_remote_size(MPI_Comm comm, int *size) |
---|
| 22 | { |
---|
| 23 | if(comm->is_ep) |
---|
| 24 | { |
---|
| 25 | return *size = comm->is_intercomm? comm->inter_rank_map->size() : 0; |
---|
| 26 | } |
---|
| 27 | return MPI_Comm_remote_size_mpi(comm, size); |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | int MPI_Comm_size_mpi(MPI_Comm comm, int* size) |
---|
| 32 | { |
---|
| 33 | Debug("MPI_Comm_size with MPI"); |
---|
| 34 | return ::MPI_Comm_size(to_mpi_comm(comm->mpi_comm), size); |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | int MPI_Comm_remote_size_mpi(MPI_Comm comm, int *size) |
---|
| 38 | { |
---|
| 39 | Debug("MPI_Comm_remote_size with MPI"); |
---|
| 40 | return ::MPI_Comm_remote_size(to_mpi_comm(comm->mpi_comm), size); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.