Mpi_send does not return after the call (except for the absence of mpi_recv)

Source: Internet
Author: User
All of us will only, mpi_send will send data buffer application and management work for us, but if this work fails, then mpi_send will be permanently blocked. Of course, this situation is limited to mpich, and lam is not the same as this, which will be mentioned below.

This usually happens when the machine memory is in a hurry. At this time, we call mpi_send. He will apply for a buffer for us and then send it. If the buffer application fails, in mpich, mpi_send blocks. Especially in this case, it is more likely to happen: in a process, we use the for loop for many times mpi_send, and then, in another process, do the corresponding mpi_recv many times, this operation is a dangerous operation, because if there is a failed mpi_send in the for loop (for example, the request for buffer fails), the whole process will block. At the same time, the mpi_recv of another process cannot receive the send request and blocks it. This causes a deadlock! Moreover, there is no error message for such deadlocks.

The implementation of Lam is a little different from that of mpich. lam submits the request buffer sent by mpi_send to the local lamd process and then returns the result. Therefore, if the request fails, lam reports an error, mpich is a silent deadlock, which is better than mpich.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.