Reputation: 21
In my C++ application, I should share information among the process every time. It is working well using MPI_Send and MPI_Recv, but in my work, it is unnecessary the "synchronization barrier" formed by the process when send/recv messages each other. Even though using the type MPI_Isend etc, there is a moment in the program where happen the "synchronization barrier".
A solution found was to put the information on files (to share data without messages) in order to the process can get/put the data without waiting for another to arrive at a specific point of code. It works as well, but it make the program lose time performance and the idea is exactly the opposite.
Thus, There is a space of memory (or way) that could work similarly a file application discribed above? Without a need to make the process communicate by messages and that to be security?
PS: "synchronization barrier" I mean a time the process have to wait for another to send/recv information.
Upvotes: 0
Views: 100
Reputation: 22670
Yes, it is possible to access memory without synchronization with MPI. This is called one-sided communication or RMA (remote memory access). Memory regions, called windows, has to be explicitly made available to this, e.g. using MPI_Win_create
. Memory access is explicit using functions like MPI_Put
and MPI_Get
. Note that each of them is non-blocking, and data movement must be explicitly synchronized. Overall there is quite a bit of boilerplate and pitfalls, so try to read the materials carefully.
Here is a more detailed introduction.
Upvotes: 1