Changeset 1053 for XIOS/dev/branch_yushan/extern/src_ep_dev/ep_reduce.cpp
- Timestamp:
- 02/17/17 17:55:37 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_reduce.cpp
r1037 r1053 447 447 if(!comm.is_ep && comm.mpi_comm) 448 448 { 449 #ifdef _serialized450 #pragma omp critical (_mpi_call)451 #endif // _serialized452 449 ::MPI_Reduce(sendbuf, recvbuf, count, static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Op>(op), root, 453 450 static_cast< ::MPI_Comm>(comm.mpi_comm)); … … 473 470 474 471 ::MPI_Aint recvsize, lb; 475 #ifdef _serialized 476 #pragma omp critical (_mpi_call) 477 #endif // _serialized 472 478 473 ::MPI_Type_get_extent(static_cast< ::MPI_Datatype>(datatype), &lb, &recvsize); 479 474 … … 489 484 if(ep_rank_loc==0) 490 485 { 491 #ifdef _serialized492 #pragma omp critical (_mpi_call)493 #endif // _serialized494 486 ::MPI_Reduce(local_recvbuf, recvbuf, count, static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Op>(op), root_mpi_rank, static_cast< ::MPI_Comm>(comm.mpi_comm)); 495 487 } … … 522 514 if(!comm.is_ep && comm.mpi_comm) 523 515 { 524 #ifdef _serialized525 #pragma omp critical (_mpi_call)526 #endif // _serialized527 516 ::MPI_Allreduce(sendbuf, recvbuf, count, static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Op>(op), 528 517 static_cast< ::MPI_Comm>(comm.mpi_comm)); … … 545 534 546 535 ::MPI_Aint recvsize, lb; 547 #ifdef _serialized 548 #pragma omp critical (_mpi_call) 549 #endif // _serialized 536 550 537 ::MPI_Type_get_extent(static_cast< ::MPI_Datatype>(datatype), &lb, &recvsize); 551 538 … … 561 548 if(ep_rank_loc==0) 562 549 { 563 #ifdef _serialized564 #pragma omp critical (_mpi_call)565 #endif // _serialized566 550 ::MPI_Allreduce(local_recvbuf, recvbuf, count, static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Op>(op), static_cast< ::MPI_Comm>(comm.mpi_comm)); 567 551 } … … 590 574 if(!comm.is_ep && comm.mpi_comm) 591 575 { 592 #ifdef _serialized593 #pragma omp critical (_mpi_call)594 #endif // _serialized595 576 ::MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, static_cast< ::MPI_Datatype>(datatype), static_cast< ::MPI_Op>(op), 596 577 static_cast< ::MPI_Comm>(comm.mpi_comm)); … … 616 597 617 598 ::MPI_Aint datasize, lb; 618 #ifdef _serialized 619 #pragma omp critical (_mpi_call) 620 #endif // _serialized 599 621 600 ::MPI_Type_get_extent(static_cast< ::MPI_Datatype>(datatype), &lb, &datasize); 622 601 … … 636 615 local_recvcnt[i] = accumulate(recvcounts+ep_rank, recvcounts+ep_rank+num_ep, 0); 637 616 } 638 #ifdef _serialized 639 #pragma omp critical (_mpi_call) 640 #endif // _serialized 617 641 618 ::MPI_Reduce_scatter(local_buf, local_buf2, local_recvcnt, static_cast< ::MPI_Datatype>(datatype), 642 619 static_cast< ::MPI_Op>(op), static_cast< ::MPI_Comm>(comm.mpi_comm));
Note: See TracChangeset
for help on using the changeset viewer.