Last change
on this file since 1081 was
1053,
checked in by yushan, 7 years ago
|
ep_lib namespace specified when netcdf involved
|
File size:
578 bytes
|
Rev | Line | |
---|
[1037] | 1 | #include "ep_lib.hpp" |
---|
| 2 | #include <mpi.h> |
---|
| 3 | //#include "ep_declaration.hpp" |
---|
| 4 | |
---|
| 5 | namespace ep_lib |
---|
| 6 | { |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) |
---|
| 11 | { |
---|
| 12 | ::MPI_Aint typesize, llb; |
---|
[1053] | 13 | ::MPI_Type_get_extent(static_cast< ::MPI_Datatype>(sendtype), &llb, &typesize); |
---|
[1037] | 14 | |
---|
| 15 | for(int i=0; i<comm.ep_comm_ptr->size_rank_info[0].second; i++) |
---|
| 16 | { |
---|
| 17 | MPI_Gather((char*)sendbuf+i*sendcount*typesize, sendcount, sendtype, recvbuf, recvcount, recvtype, i, comm); |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | return 0; |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.