51 | | This mode works as follows: (1) all ranks participating in a given window have to open an access epoch on that window calling `MPI_Win_fence`, (2) they perform the desired RMA operations on the NAM window, and (3) they close the epoch with another call to `MPI_Win_fence`. |
52 | | This mode of operation can be integrated into a hybrid task-based application by instantiating a task to open the epoch on the NAM window with an MPI fence, followed by multiple concurrent tasks that write or read data to/from the NAM window, and finally, another task closing the access epoch with another fence. |
53 | | Notice that tasks can define the corresponding dependencies on the window to ensure this order of execution. |
54 | | |
55 | | In order to support this taskification, the fences should be managed by the TAMPI library to perform it efficiently and safely. |
56 | | We have extended the !ParaStation MPI to provide a new non-blocking function called MPI_Win_ifence that performs that starts a fence operation on a specific window and generates an MPI request to check its completion later. |
| 51 | This mode works as follows: (1) all ranks participating in a given window have to open an access epoch on that window calling `MPI_Win_fence`, (2) perform the desired RMA operations on the NAM window reading or writing NAM's data, and (3) close the epoch with another call to `MPI_Win_fence`. |
| 52 | This mode of operation can be easily integrated into a hybrid task-based application by instantiating a task that opens the epoch on the NAM window with an MPI fence, followed by multiple concurrent tasks that write or read data to/from the NAM window, and finally, another task that closes the access epoch with a fence. |
| 53 | Notice that tasks should define the corresponding dependencies on the window to ensure this strict order of execution. |
| 54 | |
| 55 | However, since the MPI fence operations are blocking and synchronous, calling them from tasks is not safe. |
| 56 | Having multiple windows and opening/closing epochs on them concurrently from different tasks could end up producing a communication deadlock. |
| 57 | Thus, the taskification of the window fences and RMA operations should be managed by the TAMPI library so that we can execute them efficiently and safely, and potentially in parallel among different windows. |
| 58 | To that end, we have extended the !ParaStation MPI to provide a new non-blocking function called `MPI_Win_ifence` that starts a fence operation on a specific window and generates an MPI request to check its completion later on. |
88 | | The successors are the tasks that perform `MPI_Put` operations on the window in parallel. |
89 | | Notice that the dependencies of these tasks allow them to execute all `MPI_Put` in parallel, always after the window epoch has been opened. |
90 | | After all `MPI_Put` tasks have executed, the last task can run and close the window epoch. |
| 90 | The successors are the tasks that perform `MPI_Put` operations on the NAM window concurrently. |
| 91 | Notice that the dependencies of these tasks allow them to execute all `MPI_Put` in parallel, but always after the window epoch has been fully opened. |
| 92 | After all `MPI_Put` tasks have executed, the last task can run and close the access epoch on the NAM window. |