- 24 Nov, 2014 1 commit
-
-
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 <balaji@anl.gov>
-
- 13 Nov, 2014 3 commits
-
-
Xin Zhao authored
ReqHandler_GaccumLikeSendComplete is used for GACC-like operations, including GACC, CAS and FOP. Here we split it into following three functions: ReqHandler_GaccumSendComplete ReqHandler_CASSendComplete ReqHandler_FOPSendComplete It is convenient for us to add different actions in future for those three kinds of operations. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
Here we wrap up common action when one RMA op is finished on target into a function to make code structure cleaner. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
Originally do_accumulate_op() only accepts request pointer as argument which is too restrict to be reused. Here we modify it to access buffer address, count, datatype and op, so that it can be reused in more general cases. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
- 03 Nov, 2014 11 commits
-
-
Xin Zhao authored
We made a huge change to RMA infrastructure and a lot of old code can be droped, including separate handlers for lock-op-unlock, ACCUM_IMMED specific code, O(p) data structure code, code of lazy issuing, etc. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
1. Piggyback LOCK request with first IMMED operation. When we see an IMMED operation, we can always piggyback LOCK request with that operation to reduce one sync message of single LOCK request. When packet header of that operation is received on target, we will try to acquire the lock and perform that operation. The target either piggybacks LOCK_GRANTED message with the response packet (if available), or sends a single LOCK_GRANTED message back to origin. 2. Rewrite code of manage lock queue. When the lock request cannot be satisfied on target, we need to buffer that lock request on target. All we need to do is enqueuing the packet header, which contains all information we need after lock is granted. When the current lock is released, the runtime will goes over the lock queue and grant the lock to the next available request. After lock is granted, the runtime just trigger the packet handler for the second time. 3. Release lock on target side if piggybacking with UNLOCK. If there are active-message operations to be issued, we piggyback a UNLOCK flag with the last operation. When the target recieves it, it will release the current lock and grant the lock to the next process. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
For FOP operation, all data can be fit into the packet header, so on origin side we do not need to send separate data packets, and on target side we do not need request handler, only packet handler is needed. Similar with FOP response packet, we can receive all data in FOP resp packet handler. This patch delete the request handler on target side and simplify packet handler on target / origin side. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
We add a IMMED data area (16 bytes by default) in packet header which will contains as much origin data as possible. If origin can put all data in packet header, then it no longer needs to send separate data packet. When target recieves the packet header, it will first copy data out from the IMMED data area. If there is still more data coming, it continues to receive following packets; if all data is included in header, then recieving is done. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
During PSCW, when there are active-message operations to be issued in Win_complete, we piggback a AT_COMPLETE flag with it so that when target receives it, it can decrement a counter on target side and detect completion when target counter reaches zero. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
When the origin wants to do a FLUSH sync, if there are active-message operations that are going to be issued, we piggback the FLUSH message with the last operation; if no such operations, we just send a single FLUSH packet. If the last operation is a write op (PUT, ACC) or only a single FLUSH packet is sent, after target recieves it, target will send back a single FLUSH_ACK packet; if the last operation contains a read action (GET, GACC, FOP, CAS), after target receiveds it, target will piggback a FLUSH_ACK flag with the response packet. After origin receives the FLUSH_ACK packet or response packet with FLUSH_ACK flag, it will decrement the counter which indicates number of outgoing sync messages (FLUSH / UNLOCK). When that counter reaches zero, origin can know that remote completion is achieved. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
Separate final request handler of PUT, ACC, GACC into three. Separate derived DT request handler of ACC and GACC into two. Renaming request handlers as follows: (1) Normal request handler: it is triggered on target side when all data from origin is received. It includes: ReqHandler_PutRecvComplete --- for PUT ReqHandler_AccumRecvComplete --- for ACC ReqHandler_GaccumRecvComplete --- for GACC (2) Derived DT request handler: it is triggered on target side when all derived DT info is recieved. It includes: ReqHandler_PutDerivedDTRecvComplete --- for PUT ReqHandler_AccumDerivedDTRecvComplete --- for ACC ReqHandler_GaccumDerivedDTRecvComplete --- for GACC (3) Reponse request handler: it is triggered on target side when sending back process is finished in GET-like operations. It includes: ReqHandler_GetSendComplete --- for GET ReqHandler_GaccumLikeSendComplete --- for GACC, FOP, CAS Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
We were duplicating information in the operation structure and in the packet structure when the message is actually issued. Since most of the information is the same anyway, this patch just embeds a packet structure into the operation structure, so that we eliminate unnessary copy. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
The packet type MPIDI_CH3_PKT_PT_RMA_DONE is used for ACK of FLUSH / UNLOCK packets. Here we rename it to MPIDI_CH3_PKT_FLUSH_ACK and modify the related functions and data structures. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
We were adding an unnecessary dependency on VC structure declarations in the mpidpkt.h file. The required information in RMA lock queue is only the rank, but not actual VC. Here we replace VC with rank. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Split RMA functionality into smaller files, and move functions to where they belong based on the file names. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
- 01 Nov, 2014 2 commits
-
-
Xin Zhao authored
req->dev.user_buf points to the data sent from origin process to target process, and for FOP sometimes it points to the IMMED area in packet header when data can be fit in packet header. In such case, we should not free req->dev.user_buf in final request handler since that data area will be freed by the runtime when packet header is freed. In this patch we initialize user_buf to NULL when creating the request, and set it to NULL when FOP is completed, and avoid free a NULL pointer in final request handler. Signed-off-by:
Min Si <msi@il.is.s.u-tokyo.ac.jp>
-
The original implementation includes an optimization which allows Win_unlock for exclusive lock to return without waiting for remote completion. This relys on the assumption that window memory on target process will not be accessed by a third party until that target process finishes all RMA operations and grants the lock to other processes. However, this assumption is not correct if user uses assert MPI_MODE_NOCHECK. Consider the following code: P0 P1 P2 MPI_Win_lock(P1, NULL, exclusive); MPI_Put(X); MPI_Win_unlock(P1, exclusive); MPI_Send (P2); MPI_Recv(P0); MPI_Win_lock(P1, MODE_NOCHECK, exclusive); MPI_Get(X); MPI_Win_unlock(P1, exclusive); Both P0 and P2 issue exclusive lock to P1, and P2 uses assert MPI_MODE_NOCHECK because the lock should be granted to P2 after synchronization between P2 and P0. However, in the original implementation, GET operation on P2 might not get the updated value since Win_unlock on P0 return without waiting for remote completion. In this patch we delete this optimization. In Win_free, since every Win_unlock guarantees the remote completion, target process no longer needs to do additional counting works to detect target-side completion, but only needs to do a global barrier. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
- 01 Oct, 2014 3 commits
-
-
Xin Zhao authored
at_completion_counter is used to indicate if all Active Target operations have completed on this target. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
For GET-like operations, We should increment the Active Target counter when the process of sending back data is not completed immediately on target and a response request is created. We should decrement the counter when the process of sending back data is completed on target side. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
Xin Zhao authored
In the original implementation, for GACC/FOP/CAS, the function MPIDI_CH3_Finish_rma_op_target (includes operations that should be performed on target when that operation finishes on target) is not called when that operation real finishes, but is called after starting send back data. Here we fix it to make the function called after sending process on target is completed. Signed-off-by:
Pavan Balaji <balaji@anl.gov>
-
- 28 Sep, 2014 1 commit
-
-
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 <balaji@anl.gov>
-
- 18 Jul, 2014 1 commit
-
-
Pavan Balaji authored
This reverts commit 274a5a70.
-
- 17 Jul, 2014 1 commit
-
-
Pavan Balaji authored
We were creating duplicating information in the operation structure and in the packet structure when the message is actually issued. Since most of the information is the same anyway, this patch just embeds a packet structure into the operation structure. Signed-off-by:
Xin Zhao <xinzhao3@illinois.edu>
-
- 22 May, 2014 1 commit
-
-
Wesley Bland authored
There are quite a few places where the request cleanup is done via: MPIU_Object_set_ref(req, 0); MPIDI_CH3_Request_destroy(req); when it should be: MPID_Request_release(req); This makes the handling more uniform so requests are cleaned up by releasing references rather than hitting them with the destroy hammer. Fixes #1664 Signed-off-by:
Ken Raffenetti <raffenet@mcs.anl.gov>
-
- 30 Dec, 2013 1 commit
-
-
Antonio J. Pena authored
Mark those variables exclusively being used for assertions as potentially unused to avoid compiler warnings when the assertion macro does nothing. These show up with --enable-fast. Signed-off-by:
Pavan Balaji <balaji@mcs.anl.gov>
-
- 31 Oct, 2013 1 commit
-
-
Also includes random fixes to `-Wshorten-64-to-32` warnings which might need to be teased out. Signed-off-by:
Pavan Balaji <balaji@mcs.anl.gov>
-
- 26 Sep, 2013 1 commit
-
-
Pavan Balaji authored
The check was originally in the ch3 layer, but doesn't seem to use any ch3 specific information. This macro will be useful at the upper layers for optimizations, e.g., in the localcopy routine. Signed-off-by:
Xin Zhao <xinzhao3@illinois.edu>
-
- 28 Jul, 2013 1 commit
-
-
If "alloc_shm" is set, it may happen that the target process is doing a RMA operation from a remote process concurrently with a local process is also doing a RMA operation on the same target and on overlapping memory location. Signed-off-by:
Pavan Balaji <balaji@mcs.anl.gov>
-
- 21 Feb, 2013 4 commits
-
-
James Dinan authored
The single_op_opt flag in the request object was previously used to track whether an operation is a lock-op-unlock type, for the purposes of completion. Tracking this state has been merged into the packet header flags, so the single_op_opt flag is no longer needed. Reviewer: goodell
-
James Dinan authored
This patch uses packet header flags to piggyback the unlock operation on other RMA operations. For most operations, there is no net change. However, FOP and GACC, unlock piggybacking was previously not implemented. Reviewer: goodell
-
James Dinan authored
This patch consolidates the synchronization and tracking of RMA operations into a single routine that is called whenever we complete an operation. The only exception are lock-op-unlock operations that are completed from within the lock operation processing code. This code is pretty ugly, but it will get cleaner once packet flags are been added. Reviewer: goodell
-
James Dinan authored
Partially reverted [0b364068] in preparation for incorporating new piggybacking infrastructure. This temporarily re-introduces that bug and it will be fixed again with the new piggybacking patch. Reviwer: goodell
-
- 05 Feb, 2013 1 commit
-
-
James Dinan authored
GACC operations were both piggybacking the unlock message to the origin, and sending back a PT done packet. This was causing the origin to be unlocked twice. When another lock operation was performed between the GACC and PT done unlock operations, there was a synchronization race.
-
- 24 Jan, 2013 1 commit
-
-
James Dinan authored
-
- 05 Nov, 2012 2 commits
-
-
James Dinan authored
Fetch-and-op has been updated to ignore the origin data and perform no operation when the given op is MPI_NO_OP. Reviewer: goodell
-
James Dinan authored
Reviewer: buntinas
-
- 11 Oct, 2012 1 commit
-
-
James Dinan authored
Reviewer: goodell
-
- 10 Oct, 2012 1 commit
-
-
David Goodell authored
By setting "indent-tabs-mode:nil" we should hopefully begin to slowly squeeze out hard tabs from the source without a disruptive (to downstream projects) whitespace-fixing change. No reviewer.
-
- 20 Sep, 2012 1 commit
-
-
James Dinan authored
Updated the fetch_and_op implementation to have two data transfer paths; one where data can be embedded in the packet header and one where it is sent separately. With this change, the header size is back to 40 bytes. Reviewer: buntinas
-
- 23 Aug, 2012 1 commit
-
-
James Dinan authored
Pulled bit manipulation arithmetic into macros for converting handles to indices in MPIR_Op and MPIR_Op_check_dtype function pointer tables. Reviewer: buntinas
-