Changeset 1540 for XIOS/dev/branch_openmp/extern
- Timestamp:
- 06/12/18 14:21:57 (6 years ago)
- Location:
- XIOS/dev/branch_openmp/extern
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/extern/ep_dev/ep_exscan.cpp
r1527 r1540 122 122 reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 123 123 } 124 125 else printf("datatype Error\n");126 127 124 125 else if(datatype == MPI_LONG_LONG_INT ) 126 { 127 assert(datasize == sizeof(long long int)); 128 for(int i=0; i<ep_rank_loc; i++) 129 reduce_sum<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 130 } 131 132 else 133 { 134 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 135 MPI_Abort(comm, 0); 136 } 137 138 128 139 } 129 140 … … 172 183 } 173 184 174 else printf("datatype Error\n"); 175 } 176 177 else //if(op == MPI_MIN) 185 else if(datatype == MPI_LONG_LONG_INT ) 186 { 187 assert(datasize == sizeof(long long int)); 188 for(int i=0; i<ep_rank_loc; i++) 189 reduce_max<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 190 } 191 192 else 193 { 194 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 195 MPI_Abort(comm, 0); 196 } 197 } 198 199 else if(op == MPI_MIN) 178 200 { 179 201 if(datatype == MPI_INT ) … … 219 241 } 220 242 221 else printf("datatype Error\n"); 243 else if(datatype == MPI_LONG_LONG_INT ) 244 { 245 assert(datasize == sizeof(long long int)); 246 for(int i=0; i<ep_rank_loc; i++) 247 reduce_min<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 248 } 249 250 else 251 { 252 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 253 MPI_Abort(comm, 0); 254 } 255 } 256 257 else 258 { 259 printf("op type Error in ep_exscan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 260 MPI_Abort(comm, 0); 222 261 } 223 262 … … 231 270 if(comm->is_intercomm) return MPI_Exscan_intercomm(sendbuf, recvbuf, count, datatype, op, comm); 232 271 233 valid_type(datatype); 272 assert(valid_type(datatype)); 273 assert(valid_op(op)); 234 274 235 275 int ep_rank = comm->ep_comm_ptr->size_rank_info[0].first; -
XIOS/dev/branch_openmp/extern/ep_dev/ep_intercomm.cpp
r1538 r1540 418 418 } 419 419 420 int my_turn= ownership==1? ep_rank_loc : ep_rank_loc+repeated;421 422 #ifdef _showinfo 423 424 MPI_Barrier(peer_comm); 425 MPI_Barrier(peer_comm); 426 printf("peer_rank = %d, ep_rank_loc = %d, ownership = %d, repeated = %d, my_turn = %d\n", peer_comm->ep_comm_ptr->size_rank_info[0].first, ep_rank_loc, ownership, repeated, my_turn);420 int new_ep_rank_loc = ownership==1? ep_rank_loc : ep_rank_loc+repeated; 421 422 #ifdef _showinfo 423 424 MPI_Barrier(peer_comm); 425 MPI_Barrier(peer_comm); 426 printf("peer_rank = %d, ep_rank_loc = %d, ownership = %d, repeated = %d, new_ep_rank_loc = %d\n", peer_comm->ep_comm_ptr->size_rank_info[0].first, ep_rank_loc, ownership, repeated, new_ep_rank_loc); 427 427 MPI_Barrier(peer_comm); 428 428 MPI_Barrier(peer_comm); … … 441 441 if(iter->first == make_pair(tag, min(local_leader_rank_in_world, remote_leader_rank_in_world))) 442 442 { 443 *newintercomm = iter->second.first[ my_turn];443 *newintercomm = iter->second.first[new_ep_rank_loc]; 444 444 445 445 iter->second.second.second++; -
XIOS/dev/branch_openmp/extern/ep_dev/ep_lib.cpp
r1527 r1540 137 137 || datatype == MPI_LONG 138 138 || datatype == MPI_UNSIGNED_LONG 139 || datatype == MPI_ UINT64_T)139 || datatype == MPI_LONG_LONG) 140 140 { 141 141 return true; -
XIOS/dev/branch_openmp/extern/ep_dev/ep_merge.cpp
r1527 r1540 31 31 32 32 (*newintracomm)->ep_comm_ptr->size_rank_info[0].second = ep_size + remote_ep_size; 33 34 /////////////////////////////////// 35 int int_high = high? 1 : 0; 36 int sum_high; 37 38 MPI_Allreduce(&int_high, &sum_high, 1, MPI_INT, MPI_SUM, *newintracomm); 39 40 if(sum_high==0 || sum_high==ep_size+remote_ep_size) 41 { 42 printf("MPI_Intercomm_merge error: please define high with different value...\n"); 43 MPI_Abort(inter_comm, 0); 44 } 45 46 47 48 /////////////////////////////////// 49 33 50 (*newintracomm)->ep_comm_ptr->size_rank_info[0].first = new_ep_rank; 34 51 … … 83 100 84 101 delete[] my_triple_list; 102 85 103 } 86 104 -
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 } -
XIOS/dev/branch_openmp/extern/ep_dev/ep_scan.cpp
r1527 r1540 98 98 reduce_sum<unsigned long>(static_cast<unsigned long*>(const_cast<void*>(sendbuf)), static_cast<unsigned long*>(recvbuf), count); 99 99 } 100 101 else printf("datatype Error\n"); 100 101 else if(datatype == MPI_LONG_LONG_INT) 102 { 103 assert(datasize == sizeof(long long int)); 104 reduce_sum<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 105 } 106 107 else 108 { 109 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 110 MPI_Abort(comm, 0); 111 } 102 112 } 103 113 … … 140 150 } 141 151 142 else printf("datatype Error\n"); 143 } 144 145 else //(op == MPI_MIN) 152 else if(datatype == MPI_LONG_LONG_INT) 153 { 154 assert(datasize == sizeof(long long int)); 155 reduce_max<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 156 } 157 158 else 159 { 160 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 161 MPI_Abort(comm, 0); 162 } 163 } 164 165 else if(op == MPI_MIN) 146 166 { 147 167 if(datatype == MPI_INT ) … … 181 201 } 182 202 183 else printf("datatype Error\n"); 203 else if(datatype == MPI_LONG_LONG_INT) 204 { 205 assert(datasize == sizeof(long long int)); 206 reduce_min<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 207 } 208 209 else 210 { 211 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 212 MPI_Abort(comm, 0); 213 } 214 } 215 216 else 217 { 218 printf("op type Error in ep_scan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 219 MPI_Abort(comm, 0); 184 220 } 185 221 … … 243 279 reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 244 280 } 245 246 else printf("datatype Error\n"); 281 282 else if(datatype == MPI_LONG_LONG_INT ) 283 { 284 assert(datasize == sizeof(long long int)); 285 for(int i=1; i<ep_rank_loc+1; i++) 286 reduce_sum<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 287 } 288 289 else 290 { 291 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 292 MPI_Abort(comm, 0); 293 } 247 294 248 295 … … 293 340 } 294 341 295 else printf("datatype Error\n"); 296 } 297 298 else //if(op == MPI_MIN) 342 else if(datatype == MPI_LONG_LONG_INT ) 343 { 344 assert(datasize == sizeof(long long int)); 345 for(int i=1; i<ep_rank_loc+1; i++) 346 reduce_max<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 347 } 348 349 else 350 { 351 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 352 MPI_Abort(comm, 0); 353 } 354 355 } 356 357 else if(op == MPI_MIN) 299 358 { 300 359 if(datatype == MPI_INT ) … … 340 399 } 341 400 342 else printf("datatype Error\n"); 401 else if(datatype == MPI_LONG_LONG_INT ) 402 { 403 assert(datasize == sizeof(long long int)); 404 for(int i=1; i<ep_rank_loc+1; i++) 405 reduce_min<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 406 } 407 408 else 409 { 410 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 411 MPI_Abort(comm, 0); 412 } 413 414 } 415 416 else 417 { 418 printf("op type Error in ep_scan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 419 MPI_Abort(comm, 0); 343 420 } 344 421 -
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_exscan.cpp
r1539 r1540 122 122 reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 123 123 } 124 125 else printf("datatype Error\n");126 127 124 125 else if(datatype == MPI_LONG_LONG_INT ) 126 { 127 assert(datasize == sizeof(long long int)); 128 for(int i=0; i<ep_rank_loc; i++) 129 reduce_sum<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 130 } 131 132 else 133 { 134 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 135 MPI_Abort(comm, 0); 136 } 137 138 128 139 } 129 140 … … 172 183 } 173 184 174 else printf("datatype Error\n"); 175 } 176 177 else //if(op == MPI_MIN) 185 else if(datatype == MPI_LONG_LONG_INT ) 186 { 187 assert(datasize == sizeof(long long int)); 188 for(int i=0; i<ep_rank_loc; i++) 189 reduce_max<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 190 } 191 192 else 193 { 194 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 195 MPI_Abort(comm, 0); 196 } 197 } 198 199 else if(op == MPI_MIN) 178 200 { 179 201 if(datatype == MPI_INT ) … … 219 241 } 220 242 221 else printf("datatype Error\n"); 243 else if(datatype == MPI_LONG_LONG_INT ) 244 { 245 assert(datasize == sizeof(long long int)); 246 for(int i=0; i<ep_rank_loc; i++) 247 reduce_min<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 248 } 249 250 else 251 { 252 printf("datatype Error in ep_exscan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 253 MPI_Abort(comm, 0); 254 } 255 } 256 257 else 258 { 259 printf("op type Error in ep_exscan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 260 MPI_Abort(comm, 0); 222 261 } 223 262 … … 231 270 if(comm->is_intercomm) return MPI_Exscan_intercomm(sendbuf, recvbuf, count, datatype, op, comm); 232 271 233 valid_type(datatype); 272 assert(valid_type(datatype)); 273 assert(valid_op(op)); 234 274 235 275 int ep_rank = comm->ep_comm_ptr->size_rank_info[0].first; -
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp
r1539 r1540 137 137 || datatype == MPI_LONG 138 138 || datatype == MPI_UNSIGNED_LONG 139 || datatype == MPI_ UINT64_T)139 || datatype == MPI_LONG_LONG) 140 140 { 141 141 return true; -
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_reduce.cpp
r1539 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 } -
XIOS/dev/branch_openmp/extern/src_ep_dev/ep_scan.cpp
r1539 r1540 98 98 reduce_sum<unsigned long>(static_cast<unsigned long*>(const_cast<void*>(sendbuf)), static_cast<unsigned long*>(recvbuf), count); 99 99 } 100 101 else printf("datatype Error\n"); 100 101 else if(datatype == MPI_LONG_LONG_INT) 102 { 103 assert(datasize == sizeof(long long int)); 104 reduce_sum<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 105 } 106 107 else 108 { 109 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 110 MPI_Abort(comm, 0); 111 } 102 112 } 103 113 … … 140 150 } 141 151 142 else printf("datatype Error\n"); 143 } 144 145 else //(op == MPI_MIN) 152 else if(datatype == MPI_LONG_LONG_INT) 153 { 154 assert(datasize == sizeof(long long int)); 155 reduce_max<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 156 } 157 158 else 159 { 160 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 161 MPI_Abort(comm, 0); 162 } 163 } 164 165 else if(op == MPI_MIN) 146 166 { 147 167 if(datatype == MPI_INT ) … … 181 201 } 182 202 183 else printf("datatype Error\n"); 203 else if(datatype == MPI_LONG_LONG_INT) 204 { 205 assert(datasize == sizeof(long long int)); 206 reduce_min<long long int>(static_cast<long long int*>(const_cast<void*>(sendbuf)), static_cast<long long int*>(recvbuf), count); 207 } 208 209 else 210 { 211 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 212 MPI_Abort(comm, 0); 213 } 214 } 215 216 else 217 { 218 printf("op type Error in ep_scan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 219 MPI_Abort(comm, 0); 184 220 } 185 221 … … 243 279 reduce_sum<unsigned long>(static_cast<unsigned long*>(comm->my_buffer->void_buffer[i]), static_cast<unsigned long*>(recvbuf), count); 244 280 } 245 246 else printf("datatype Error\n"); 281 282 else if(datatype == MPI_LONG_LONG_INT ) 283 { 284 assert(datasize == sizeof(long long int)); 285 for(int i=1; i<ep_rank_loc+1; i++) 286 reduce_sum<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 287 } 288 289 else 290 { 291 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 292 MPI_Abort(comm, 0); 293 } 247 294 248 295 … … 293 340 } 294 341 295 else printf("datatype Error\n"); 296 } 297 298 else //if(op == MPI_MIN) 342 else if(datatype == MPI_LONG_LONG_INT ) 343 { 344 assert(datasize == sizeof(long long int)); 345 for(int i=1; i<ep_rank_loc+1; i++) 346 reduce_max<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 347 } 348 349 else 350 { 351 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 352 MPI_Abort(comm, 0); 353 } 354 355 } 356 357 else if(op == MPI_MIN) 299 358 { 300 359 if(datatype == MPI_INT ) … … 340 399 } 341 400 342 else printf("datatype Error\n"); 401 else if(datatype == MPI_LONG_LONG_INT ) 402 { 403 assert(datasize == sizeof(long long int)); 404 for(int i=1; i<ep_rank_loc+1; i++) 405 reduce_min<long long int>(static_cast<long long int*>(comm->my_buffer->void_buffer[i]), static_cast<long long int*>(recvbuf), count); 406 } 407 408 else 409 { 410 printf("datatype Error in ep_scan : INT, FLOAT, DOUBLE, CHAR, LONG, UNSIGNED_LONG, LONG_LONG_INT\n"); 411 MPI_Abort(comm, 0); 412 } 413 414 } 415 416 else 417 { 418 printf("op type Error in ep_scan : MPI_MAX, MPI_MIN, MPI_SUM\n"); 419 MPI_Abort(comm, 0); 343 420 } 344 421
Note: See TracChangeset
for help on using the changeset viewer.