Changeset 1540 for XIOS/dev/branch_openmp/extern/ep_dev/ep_reduce.cpp
- Timestamp:
- 06/12/18 14:21:57 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_reduce.cpp
r1527 r1540 124 124 } 125 125 126 else if(datatype == MPI_UINT64_T)127 {128 assert(datasize == sizeof(uint64_t));129 for(int i=1; i<num_ep; i++)130 reduce_max<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count);131 }132 133 126 else if(datatype == MPI_LONG_LONG_INT) 134 127 { … … 138 131 } 139 132 140 else printf("datatype Error\n"); 141 142 } 143 144 if(op == MPI_MIN) 133 else 134 { 135 printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 136 MPI_Abort(comm, 0); 137 } 138 139 } 140 141 else if(op == MPI_MIN) 145 142 { 146 143 if(datatype ==MPI_INT) … … 186 183 } 187 184 188 else if(datatype == MPI_UINT64_T)189 {190 assert(datasize == sizeof(uint64_t));191 for(int i=1; i<num_ep; i++)192 reduce_min<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count);193 }194 195 185 else if(datatype == MPI_LONG_LONG_INT) 196 186 { … … 200 190 } 201 191 202 else printf("datatype Error\n"); 203 204 } 205 206 207 if(op == MPI_SUM) 192 else 193 { 194 printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 195 MPI_Abort(comm, 0); 196 } 197 198 } 199 200 201 else if(op == MPI_SUM) 208 202 { 209 203 if(datatype==MPI_INT) … … 247 241 for(int i=1; i<num_ep; i++) 248 242 reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 249 }250 251 else if(datatype ==MPI_UINT64_T)252 {253 assert(datasize == sizeof(uint64_t));254 for(int i=1; i<num_ep; i++)255 reduce_sum<uint64_t>(static_cast<uint64_t*>(comm->my_buffer->void_buffer[i]), static_cast<uint64_t*>(recvbuf), count);256 243 } 257 244 … … 263 250 } 264 251 265 else printf("datatype Error\n"); 266 267 } 268 269 if(op == MPI_LOR) 252 else 253 { 254 printf("datatype Error in ep_reduce : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 255 MPI_Abort(comm, 0); 256 } 257 258 } 259 260 else if(op == MPI_LOR) 270 261 { 271 262 if(datatype != MPI_INT) … … 277 268 reduce_lor<int>(static_cast<int*>(comm->my_buffer->void_buffer[i]), static_cast<int*>(recvbuf), count); 278 269 } 270 } 271 272 else 273 { 274 printf("op type Error in ep_reduce : MPI_MAX, MPI_MIN, MPI_SUM, MPI_LOR\n"); 275 MPI_Abort(comm, 0); 279 276 } 280 277 }
Note: See TracChangeset
for help on using the changeset viewer.