• Xin Zhao's avatar
    Fix completion on target side in Active Target synchronization. · aa36f043
    Xin Zhao authored
    For Active Target synchronization, the original implementation
    does not guarantee the completion of all ops on target side
    when Win_wait / Win_fence returns. It is implemented using a
    counter, which is decremented when the last operation from that
    origin finishes. Win_wait / Win_fence waits until that counter
    reaches zero. Problem is that, when the last operation finishes,
    the previous GET-like operation (for example with a large data
    volume) may have not finished yet. This breaks the semantic of
    Win_wait / Win_fence.
    Here we fix this by increment the counter whenever we meet a
    GET-like operation, and decrement it when that operation finishes
    on target side. This will guarantee that when counter reaches
    zero and Win_wait / Win_fence returns, all operations are completed
    on the target.
    Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>