1. 16 Dec, 2014 13 commits
    • Xin Zhao's avatar
      Do memory barriers at proper places in RMA sync calls. · 6f8c3e59
      Xin Zhao authored
      We call memory barriers at proper places in RMA sync calls
      as following, and remove unnecessary memory barriers:
      
      (1) Win_fence: very beginning and very end.
      (2) Win_post/Win_complete: very beginning.
      (3) Win_start/Win_wait/Win_test: very end.
      (4) Win_lock/Win_lock_all: very end.
      (5) Win_unlock/Win_unlock_all: very beginning.
      (6) Win_flush/Win_flush_local/Win_flush_all/Win_flush_local_all: very beginning.
      
      About the reason of doing this, please refer to comments
      at the beginning of src/mpid/ch3/src/ch3u_rma_sync.c.
      
      No reviewer.
      6f8c3e59
    • Xin Zhao's avatar
      Poke progress engine in RMA sync call when needed · fb6a441b
      Xin Zhao authored
      In ending RMA synchronization calls, we poke the
      progress engine at last if we never poke it before.
      Because some program execution depends on the
      incoming events in progress engine, if we never
      process them we may cause deadlock in the program.
      
      No reviewer.
      fb6a441b
    • Xin Zhao's avatar
      Bug-fix: modify free_ops_before_completion function · 04d15190
      Xin Zhao authored
      Originally free_ops_before_completion functions only
      works with active target. Here we modify it to accomodate
      passive target as well.
      
      Also, everytime we trigger free_ops_before_completion,
      we lose the chance to do real Win_flush_local operation
      and must do a Win_flush instead. Here we transfer
      Win_flush_local to Win_flush if disable_flush_local flag
      is set, and unset that flag after the current flush
      is fone.
      
      No reviewer.
      04d15190
    • Xin Zhao's avatar
      097c9628
    • Xin Zhao's avatar
      Use int instead of size_t in RMA pkt header. · 3a05784f
      Xin Zhao authored
      Use int instead of size_t in RMA pkt header to reduce
      packet size.
      
      No reviewer.
      3a05784f
    • Xin Zhao's avatar
      Bug-fix: set put_acc_issued flag correctly · cc158ff2
      Xin Zhao authored
      No reviewer.
      cc158ff2
    • Xin Zhao's avatar
      Perf-optimize: avoid FLUSH/FLUSH_ACK messages if no PUT/ACC. · 2493e98b
      Xin Zhao authored
      No reviewer.
      2493e98b
    • Xin Zhao's avatar
      Bug-fix: add IMMED area in GET/GACC response packets · 87acbbbe
      Xin Zhao authored
      In this patch we allow GET/GACC response packets to
      piggyback some IMMED data, just like what we did
      for PUT/GACC/FOP/CAS packets.
      
      No reviewer.
      87acbbbe
    • Xin Zhao's avatar
      Perf-optimize: support piggybacking LOCK on large RMA operations. · 4739df59
      Xin Zhao authored
      Originally we only allows LOCK request to be piggybacked
      with small RMA operations (all data can be fit in packet
      header). This brings communication overhead for larger
      operations since origin side needs to wait for the LOCK
      ACK before it can transmit data to the target.
      
      In this patch we add support of piggybacking LOCK with
      RMA operations with arbitrary size. Note that (1) this
      only works with basic datatypes; (2) if the LOCK cannot
      be satisfied, we temporarily buffer this operation on
      the target side.
      
      No reviewer.
      4739df59
    • Xin Zhao's avatar
      Bug-fix: handle dest==MPI_PROC_NULL in Win_flush/flush_local · e12376fd
      Xin Zhao authored
      No reviewer.
      e12376fd
    • Xin Zhao's avatar
      Bug-fix: check win_ptr->active_req_cnt in RMA sync calls · e92b7746
      Xin Zhao authored
      No reviewer.
      e92b7746
    • Xin Zhao's avatar
      Bug-fix: correctly modify win_ptr->accumulated_ops_cnt · 7b1a5e2d
      Xin Zhao authored
      accumulated_ops_cnt is used to track no. of accumulated
      posted RMA operations between two synchronization calls,
      so that we can decide when to poke progress engine based
      on the current value of this counter.
      
      Here we initialize it to zero in the BEGINNING synchronization
      calls (Win_fence, Win_start, first Win_lock, Win_lock_all),
      and correctly decrement it in the ENDING synchronization calls
      (Win_fence, Win_complete, Win_unlock, Win_unlock_all,
      Win_flush, Win_flush_local, Win_flush_all, Win_flush_local_all).
      We also use a per-target counter to track single target case.
      
      No reviewer.
      7b1a5e2d
    • Xin Zhao's avatar
      Code-refactor: arrange RMA sync functions. · a544067b
      Xin Zhao authored
      Arrange RMA sync functions in src/mpid/ch3/src/ch3u_rma_sync.c
      in the following order:
      
      Win_fence
      Win_post
      Win_start
      Win_complete
      Win_wait
      Win_test
      Win_lock
      Win_unlock
      Win_flush
      Win_flush_local
      Win_lock_all
      Win_unlock_all
      Win_flush_all
      Win_flush_local_all
      Win_sync
      
      No reviewer.
      a544067b
  2. 26 Nov, 2014 2 commits
  3. 24 Nov, 2014 1 commit
    • Xin Zhao's avatar
      Bug-fix: preventing completing the same RMA request twice. · 8a0887b9
      Xin Zhao authored
      
      
      It is possible that a request handler of RMA request is
      called for the second time inside the first called request
      handler on the same request.
      
      Consider the following case: a req is queued up in Nemesis
      SHM queue with ref count of 2: one is for request completion
      and another is for dequeueing from SHM queue. The first
      called req handler completed this request and decrement ref
      count to 1. This request is still in the queue. However,
      within this handler, we trigger the same req handler on the
      same request again (for example making progress on SHM queue),
      and the second called handler also tries to complete this
      request, which leads to the wrong execution.
      
      In this patch we check if request has already been completed
      when entering the req handler, to prevent processing the same
      request twice. We also move the function finish_op_on_target()
      (where the same req handler can be triggered again)
      after request completion routine, so that we can mark the
      current request as completed before enter the same req handler
      for the second time.
      
      Fix #2204
      Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
      8a0887b9
  4. 20 Nov, 2014 1 commit
  5. 17 Nov, 2014 1 commit
  6. 13 Nov, 2014 6 commits
  7. 12 Nov, 2014 4 commits
    • Huiwei Lu's avatar
      Adds checking VC state in MPID_Recv · af8b2d04
      Huiwei Lu authored
      
      
      Similar to d086ac27, check the state of a VC to see if it is valid
      before creating a group, request or communicator in MPID_Recv.
      Signed-off-by: default avatarWesley Bland <wbland@anl.gov>
      af8b2d04
    • Huiwei Lu's avatar
      Adds checking VC state in MPID_Send · a91f178a
      Huiwei Lu authored
      
      
      MPID_Send should first check the state of a VC to see if it is valid
      before creating a group, request or communicator.
      
      In the case of fault tolerance, if VC has already been revoked or marked
      as terminated (e.g., in test/mpi/ft/senddead). The send operation
      evolved should exit without creating any memory objects of request,
      group or communicator.
      Signed-off-by: default avatarWesley Bland <wbland@anl.gov>
      a91f178a
    • Wesley Bland's avatar
      Change errflag to be an enum · 3850e6bf
      Wesley Bland authored
      
      
      The errflag value being used in the MPIC helper functions only
      propagated whether or not an error occurred. It did not contain any
      information about what kind of error occurred, which made returning the
      correct error code after a process failure impossible.
      
      This patch converts the binary value to an enum with three options:
      MPIR_ERR_NONE
      MPIR_ERR_PROC_FAILED
      MPIR_ERR_OTHER
      
      The original use of TRUE and false maps to MPIR_ERR_NONE and
      MPIR_ERR_OTHER.
      
      MPIR_ERR_PROC_FAILED indicates that the error occurred
      because of a process failure. It uses the new bit set aside from the tag
      space to track such information between processes.
      
      This change required modifying lots of function signatures and type
      declarations to use the new enum type, but these are actually not very
      intrusive changes and shouldn't be a problem going forward.
      Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
      3850e6bf
    • Wesley Bland's avatar
      Take a bit in the tag space for proc failure · 46f59276
      Wesley Bland authored
      
      
      We need to take another bit from the tag space to specify the difference
      between a generic failure and a process failure. This patch modifies the
      macros to handle this situation.
      Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
      46f59276
  8. 11 Nov, 2014 4 commits
  9. 10 Nov, 2014 1 commit
  10. 07 Nov, 2014 4 commits
  11. 06 Nov, 2014 2 commits
  12. 05 Nov, 2014 1 commit