Six Most Basic MPI Functions

From HPCBugBase

Jump to: navigation, search

HPCBugBase Menu

Submit feedback


Overview


Index


Index by Languages

While the MPI (Message Passinge Interface) consists of several hundsreds of APIs, data types and structures (the exact number varies depends on the version), an empirical observation indicates that the number of frequently used MPI functions is relatively small. In particular, the following 6 functions are arguably the most basic API functions which are contained in most MPI programs.

  • MPI_Init: initialize the MPI execution environment
  • MPI_Finalize: terminates MPI execution environment
  • MPI_Comm_size: obtain the size of the group (the number of processes in the simplest usage)
  • MPI_Comm_rank: obtain the rank of the calling process
  • MPI_Send: perform a basic send
  • MPI_Recv: perform a basic recv

Most novices start with these 'simple' functions to learn the basics of MPI programming. However, it doesn't mean it is easy to use them without making defects. The defects that are related to these functions and actually found in novices' code include Passing NULL to MPI Init, Missing MPI Finalize, and Potential Deadlock.

Pages referring to this entry: Potential Deadlock 

Personal tools