Proposed Answer MPI_REDUCE & MPI_BARRIER

  • 2012年1月6日 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

すべての返信

  • 2012年1月7日 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