MPI parallel programming example tutorial part1.mpi parallel environment and encoding model

Source: Internet
Author: User

1. parallel programming mode-message transmission:

Message Passing libraries with common functions include picl, PVM, parmacs, P4, and MPI. The message passing libraries customized for specific systems include MPL, NX, and cmmd.

The main disadvantage of the Message Passing model is that explicit DATA division and process synchronization are required during the programming process. Therefore, you need to spend a lot of energy to solve data dependencies and prevent deadlocks.

2. Basic concepts of MPI message communication

    • Cache area

The MPI Environment defines three cache zones:

Application Buffer Zone

It refers to the address space for saving the data to be sent or received, which is the content part defined in the message format.

System Buffer Zone

The MPI Environment is the storage space for communication.

Buffer Zone registered by the user to the System

When you use some APIs (mpi_bsend ),ProgramAnd then register it to the MPI Environment for communication.

    • Communicator)

Communication Sub-nodes are the basic infrastructure for managing processes and communications in the MPI Environment. (Eg: mpi_comm_world ). Operations on a process must be placed in the communication sub-body.

    • Communication Protocol:

The MPI Environment adopts the following communication protocols:

Communication Protocol (EAGER)

It is always assumed that the target process is capable of saving message data. Note: This method reduces synchronization latency and simplifies programming, but requires a considerable number of buffers.

Centralized communication protocol (rendezvous)

The send action can be executed only after the target is ready. Note: This method ensures reliability and security, and provides the possibility of eliminating multiple data records, but increases programming complexity (with wait/test mechanisms ), it also brings about synchronization latency (it takes time to wait for the process to permit ).

Message disconnection protocol (short)

The message data is sent together with the envelope.

From: MPI parallel programming example tutorial

Zhang wusheng waited for Tsinghua University Press

More: http://blog.donews.com/me1105/archive/2011/02/10/115.aspx

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.