-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Motivation
The current window construction routines are not good. The problems include:
-
Lack of strict orthogonality:
win_allocateincludes the functionality ofwin_allocate_shared, except that the shared-memory associated with the former cannot be queried. -
Lack of type-safety. Many optimizations cannot happen because windows are just bytes and the implementation does not know the type used for access until an RMA operation is issued.
-
Lack of subsetting synchronization motifs. No reasonable use case requires all the synchronization motifs, and supporting them all for every window is a burden on the implementation.
-
Lack of other subsetting that would improve performance and make high-quality implementations easier.
New signatures
We condense win_allocate and win_allocate_shared into one routine, with the expectation that win_shared_query will be able to query shared-memory associated with all windows (see "relax constraints on MPI_WIN_SHARED_QUERY" for details).
int MPI_Win_allocate_new(MPI_Datatype base_datatype,
MPI_Window_assertions window_assertions,
MPI_Comm comm,
void ** baseptr_out,
MPI_Win * win)
We condense win_create and win_create_dynamic into one routine. Users are permitted to attach memory to a win_create_new window, assuming the appropriate assertion is specified.
int MPI_Win_create_new(const void * baseptr_in,
MPI_Datatype base_datatype,
MPI_Window_assertions window_assertions,
MPI_Comm comm,
MPI_Win * win)
TODO: new function to query windows that have more than one buffer attached (win_create_dynamic and win_create_new).
Window assertions
This is a bit field that contains the following entries, which will be implemented as opaque values like other RMA assertions.
Assertions here are a statement of intent to use the named feature;
if a given assertion is not provided, the implementation does not
need to support this feature for the window.
- Local load-store access
- Remote load-store access
- Post-Start-Complete-Wait synchronization
- Fence synchronization
- Shared lock or lock_all synchronization
- Exclusive lock synchronization
- Ordered NO_OP/REPLACE operations
- Ordered accumulate operations
- Multi-element RMA operations
- User-defined datatype RMA operations
- Attach/detach memory ! MPI_Win_create_new only
If the implementation cannot support all of the assertions supplied by the user, the window constructor call must fail. The user can thus assume that all successful window constructor calls implement the specified assertions.