Changeset 1110
- Timestamp:
- 05/02/17 17:03:25 (7 years ago)
- Location:
- XIOS/dev/branch_yushan
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/extern/remap/src/mpi_routing.cpp
r1053 r1110 155 155 for (int i = 0; i < nbSource; i++) 156 156 { 157 #ifdef _usingEP 158 MPI_Irecv(&sourceRank[i], 1, MPI_INT, -1, 0, communicator, &request[indexRequest]); 159 #else 157 160 MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]); 161 #endif 158 162 indexRequest++; 159 163 } … … 175 179 for (int i = 0; i < nbSource; i++) 176 180 { 181 #ifdef _usingEP 182 MPI_Irecv(&sourceRank[i], 1, MPI_INT, -1, 0, communicator, &request[indexRequest]); 183 #else 177 184 MPI_Irecv(&sourceRank[i], 1, MPI_INT, MPI_ANY_SOURCE, 0, communicator, &request[indexRequest]); 185 #endif 178 186 indexRequest++; 179 187 } -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_lib.hpp
r1068 r1110 15 15 typedef int MPI_Datatype; 16 16 typedef int MPI_Op; 17 #define MPI_ANY_SOURCE -218 #define MPI_ANY_TAG -117 #define EP_ANY_SOURCE -2 18 #define EP_ANY_TAG -1 19 19 #elif _openmpi 20 20 typedef void* MPI_Datatype; 21 21 typedef void* MPI_Op; 22 #define MPI_ANY_SOURCE -123 #define MPI_ANY_TAG -122 #define EP_ANY_SOURCE -1 23 #define EP_ANY_TAG -1 24 24 #endif 25 25 -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_message.cpp
r1068 r1110 50 50 } 51 51 #elif _intelmpi 52 //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 53 ::MPI_Improbe(-2, -1, mpi_comm, &flag, &message, &status); 52 ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 54 53 #endif 55 54 … … 129 128 } 130 129 #elif _intelmpi 131 //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 132 ::MPI_Improbe(-2, -1, mpi_comm, &flag, &message, &status); 130 ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 133 131 #endif 134 132 … … 185 183 } 186 184 #elif _intelmpi 187 ::MPI_Improbe( -2, -1, mpi_comm, &flag, &message, &status);185 ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status); 188 186 #endif 189 187 -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_probe.cpp
r1060 r1110 16 16 ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm); 17 17 ::MPI_Status *mpi_status = static_cast< ::MPI_Status* >(status->mpi_status); 18 ::MPI_Iprobe(src ,tag, mpi_comm, flag, mpi_status);18 ::MPI_Iprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, mpi_status); 19 19 20 20 status->mpi_status = mpi_status; … … 81 81 #pragma omp critical (_mpi_call) 82 82 { 83 ::MPI_Iprobe(src ,tag, mpi_comm, flag, &mpi_status);83 ::MPI_Iprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, &mpi_status); 84 84 if(*flag) 85 85 { 86 ::MPI_Mprobe(src ,tag, mpi_comm, &mpi_message, &mpi_status);86 ::MPI_Mprobe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_message, &mpi_status); 87 87 } 88 88 } 89 89 #elif _intelmpi 90 ::MPI_Improbe(src ,tag, mpi_comm, flag, &mpi_message, &mpi_status);90 ::MPI_Improbe(src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, flag, &mpi_message, &mpi_status); 91 91 #endif 92 92 -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_recv.cpp
r1053 r1110 25 25 ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm >(comm.mpi_comm); 26 26 ::MPI_Status mpi_status; 27 ::MPI_Recv(buf, count, static_cast< ::MPI_Datatype >(datatype), src ,tag, mpi_comm, &mpi_status);27 ::MPI_Recv(buf, count, static_cast< ::MPI_Datatype >(datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_status); 28 28 29 29 status->ep_src = src; … … 57 57 ::MPI_Request mpi_request; 58 58 ::MPI_Comm mpi_comm = static_cast< ::MPI_Comm > (comm.mpi_comm); 59 ::MPI_Irecv(buf, count, static_cast< ::MPI_Datatype> (datatype), src ,tag, mpi_comm, &mpi_request);59 ::MPI_Irecv(buf, count, static_cast< ::MPI_Datatype> (datatype), src<0? MPI_ANY_SOURCE : src, tag<0? MPI_ANY_TAG: tag, mpi_comm, &mpi_request); 60 60 61 61 request->mpi_request = mpi_request; -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_type.hpp
r1087 r1110 41 41 namespace ep_lib 42 42 { 43 #define MPI_UNDEFINED -3276643 //#define EP_UNDEFINED -32766 44 44 45 45 class ep_communicator; -
XIOS/dev/branch_yushan/src/event_scheduler.cpp
r1037 r1110 133 133 while(received) 134 134 { 135 #ifdef _usingEP 136 MPI_Iprobe(-1,1,communicator,&received, &status) ; 137 #else 135 138 MPI_Iprobe(MPI_ANY_SOURCE,1,communicator,&received, &status) ; 139 #endif 136 140 if (received) 137 141 { 138 142 recvRequest=new SPendingRequest ; 143 #ifdef _usingEP 144 MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, -1, 1, communicator, &(recvRequest->request)) ; 145 #else 139 146 MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 1, communicator, &(recvRequest->request)) ; 147 #endif 140 148 pendingRecvParentRequest.push(recvRequest) ; 141 149 } … … 175 183 while(received) 176 184 { 185 #ifdef _usingEP 186 MPI_Iprobe(-1,0,communicator,&received, &status) ; 187 #else 177 188 MPI_Iprobe(MPI_ANY_SOURCE,0,communicator,&received, &status) ; 189 #endif 178 190 if (received) 179 191 { 180 192 recvRequest=new SPendingRequest ; 193 #ifdef _usingEP 194 MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, -1, 0, communicator, &recvRequest->request) ; 195 #else 181 196 MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, MPI_ANY_SOURCE, 0, communicator, &recvRequest->request) ; 197 #endif 182 198 pendingRecvChildRequest.push_back(recvRequest) ; 183 199 } -
XIOS/dev/branch_yushan/src/server.cpp
r1085 r1110 281 281 { 282 282 traceOff() ; 283 #ifdef _usingEP 284 MPI_Iprobe(-1,1,CXios::globalComm, &flag, &status) ; 285 #else 283 286 MPI_Iprobe(MPI_ANY_SOURCE,1,CXios::globalComm, &flag, &status) ; 287 #endif 284 288 traceOn() ; 285 289
Note: See TracChangeset
for help on using the changeset viewer.