Re: [Mpi3-rma] MPI RMW operations
Hello Brian, Brian W. Barrett wrote:
That makes sense. How would an MPI_Rmw() call with the IMPLICIT epoch interact with explicit epochs? If the answer is "it wouldn't", I think that's valid. We just need to state it.
This is a good point. Given the way it is illegal to have an 'epoch within an epoch' currently, I think this should continue to be enforced. So I would prefer the "it wouldn't", otherwise we risk making rma epoch semantics more complicated.
Also, is there any reason we're not using the standard OP defines?
We could use the standard ones for the non-fetching operations. For fetching operations we could re-use them as long as it was clearly defined what was returned to the initiator in 'result_addr'. Some new operations would have to be added for compare and swap and masked compare and swap though. Howard
Brian
On Mar 25, 2008, at 9:14 AM, Howard Pritchard wrote:
Hello Brian,
That was the idea.
The problem as we saw it is that in non-mpi shared memory applications, atomic memory operations are typically used for lightweight synchronization. Having to always use potentially heavyweight lock/ unlock sequences seems to defeat the purpose of adding rmw operations to the mpi specification.
This is a special case of the more general discussion that we should have about global visibility of rma operations, etc.
Howard
Brian W. Barrett wrote:
If MPI_MODE_PASSIVE_EPOCH_IMPLICIT is not given, is synchronization explicit using the standard epoch functions?
Brian
On Mar 24, 2008, at 9:09 PM, Shipman, Galen M. wrote:
Howard and I have been working on the RMW operations listed below for consideration.
- Galen Shipman - ORNL
Single operand RMW operations
MPI_Rmw(void *operand_addr, int count, MPI_Datatype datatype, void *result_addr, int target_rank, MPI_Aint target_disp, int assert, MPI_RMW_Op op, MPI_Win win)
Two operand RMW operations
MPI_Rmw2(void *operand_addr, int count, MPI_Datatype datatype, void *operand2_addr, void *result_addr, int target_rank, MPI_Aint target_disp, int assert, MPI_RMW_2_Op op, MPI_Win win)
MPI_RMW_Op Predefined RMW single operand operations The following predefined operations are supplied for MPI_RMW and related functions. These operations are invoked by placing the following in op.
Name Meaning
MPI_RMW_INC increment MPI_RMW_PROD product MPI_RMW_SUM sum MPI_RMW_LAND logical and MPI_RMW_LOR logical or MPI_RMW_LXOR logical xor MPI_RMW_BAND binary and MPI_RMW_BOR binary or MPI_RMW_BXOR binary xor MPI_RMW_SWAP swap value
MPI_RMW_2_Op Predefined RMW two operand operations
Name Meaning
MPI_RMW2_MASK_SWAP swap masked bits MPI_RMW2_COMP_SWAP compare and swap
Note: MPI_RMW2_COMP_SWAP is an equality comparison, we may wish to consider multiple comparison operations such as >, >=, <, <=, ==, <>.
Both MPI_Rmw and MPI_Rmw2 take an assert argument. When assert == MPI_MODE_PASSIVE_EPOCH_IMPLICIT MPI_Rmw/2 is equivalent to:
MPI_Win_lock(target_rank,0,win); MPI_Rmw(.....); MPI_Win_unlock(target_rank,0,win);
When assert == MPI_MODE_PASSIVE_EPOCH_IMPLICIT | MPI_MODE_NOCHECK the MPI library knows that the window lock at the target need not be acquired.
_______________________________________________ mpi3-rma mailing list [email protected] http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
--
Howard Pritchard Cray Inc.
_______________________________________________ mpi3-rma mailing list [email protected] http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-rma
-- Howard Pritchard Cray Inc.
participants (1)
-
Howard Pritchard