HP-MPI User's Guide (11th Edition)

Introduction
MPI concepts
Chapter 1 5
You must call MPI_Finalize in your application to conform to the MPI
Standard. HP-MPI issues a warning when a process exits without calling
MPI_Finalize.
CAUTION There should be no code before MPI_Init and after MPI_Finalize.
Applications that violate this rule are non-portable and may give
incorrect results.
As your application grows in complexity, you can introduce other
routines from the library. For example, MPI_Bcast is an often-used
routine for sending or broadcasting data from one process to other
processes in a single operation. Use broadcast transfers to get better
performance than with point-to-point transfers. The latter use MPI_Send
to send data from each sending process and MPI_Recv to receive it at
each receiving process.
The following sections briefly introduce the concepts underlying MPI
library routines. For more detailed information refer to MPI: A
Message-Passing Interface Standard.
Table 1-1 Six commonly used MPI routines
MPI routine Description
MPI_Init Initializes the MPI environment
MPI_Finalize Terminates the MPI environment
MPI_Comm_rank Determines the rank of the calling
process within a group
MPI_Comm_size Determines the size of the group
MPI_Send Sends messages
MPI_Recv Receives messages