Proposed Answer MPI_REDUCE & MPI_BARRIER

  • 6. ledna 2012 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

Všechny reakce

  • 7. ledna 2012 3:37
     
     Navržená odpověď

    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