Now I am planning to use an MPI to create a solar that supports asynchronous communication. The basic idea is as follows.
Let's say there are two parallel processes that process 1 wishes to send a good solution, which allows it to perform 2 processes periodically. And when seeking good solutions from Process 2, it requires diversification. My questions are:
-
At some point, use MPI_send to send a solution of Process 2, using process 1 to ensure that one MPI_Rev that matches this MPI_Send Due to this, sending it is going on dynamically.
-
When process 1 requires a solution, how can she send a request to process 2 and 2 will take care of her request at the time of processing?
Thanks for the help.
depending on the nature of the MPI_ * function you call, When the process is not called it sends, so you have to make sure that your code is going to be in. There also non-blocking function calls MPI_Isend f.ex, which gives you a request-handle, which you can later see if the process' received by receiving mail.
Regarding your problem, you can get a non-blocking (in the most basic form of MPI_Irecv) and check the status of each N seconds based on your application. Then the position will be set to completion when a message is received and ready to be read.
If this time is sensitive, then use blocking calls while waiting for the message. The blocking mechanism (at least in openmpi) uses spinning voting, so the waiting process will eat 100% cpu.
Comments
Post a Comment