Proposed Answer MPI_REDUCE & MPI_BARRIER

  • 6 มกราคม 2555 7:14
     
     
    Hi, i would like to know if it's necessary to add an MPI_BARRIER before MPI_REDUCE or it's done automatically by this last. Thank you answer me

ตอบทั้งหมด

  • 7 มกราคม 2555 3:37
     
     คำตอบที่เสนอ

    Hi,

    MPI_Reduce does not have synchronization semantics and thus there's no implicit barrier within MPI_Reduce. If you want to achieve synchronization with MPI_Reduce, you would have to explicitly issue MPI_Barrier (either before or after MPI_Reduce, depending on the code and the effects you want to achieve)

    Let me know if that answers your question

    • เสนอเป็นคำตอบโดย Fab Tillier [MS] 13 กุมภาพันธ์ 2555 5:17
    •