MPI Environment Management Routines

The following is a list of the most common MPI routines including those for initializing, terminating, and managing the MPI environment.

MPI Routine Syntax Description

MPI_Init

MPI_Init(NULL,NULL)

Initializes an MPI execution environment.

MPI_Comm_size

MPI_Comm_size(comm,&size)

Returns the total number of MPI processes in the specified communicator.

MPI_Comm_rank

MPI_Comm_rank(comm,&rank)

Returns the calling process rank (process id) in the specified communicator.

MPI_Abort

MPI_Abort(comm,error_code)

Terminates all MPI processes associated with the specified communicator.

MPI_Get_processor_name

MPI_Get_processor_name(&name,&result_length)

Returns the processor name.

MPI_Send

int MPI_Send(*buffer, count,datatype,destination,tag,comm)

Begins a blocking send.

MPI_Isend

int MPI_Isend(*buffer,count,datatype,destination,tag,comm,*request)

Begins a non-blocking send.

MPI_Recv

int MPI_Recv(*buffer,count,datatype,source,tag,comm,*status)

Begins a blocking receive for a message.

MPI_Irecv

int MPI_Irecv(*buffer,count,datatype,source,tag,comm,*request)

Begins a non-blocking receive for a message.

MPI_Sendrecv

int MPI_Sendrecv(*send_buffer,send_count,send_type,destination,end_tag,*receive_buffer,receive_count,receive_type,source,receive_tag,comm,*status)

Sends and receives a message.

MPI_Bcast

int MPI_Bcast(*buffer,count,datatype,root,comm)

Broadcasts a message to a group of processes.

MPI_Put

int MPI_Put(*origin_address,origin_count,origin_datatype,target_rank,target_disp,target_count,target_datatype,win)

Puts data into a memory window on a remote process.

MPI_Get

int MPI_Get(*origin_address,origin_count,origin_datatype,target_rank,target_disp,target_count,target_datatype,win)

Gets data from a memory window on a remote process.

MPI_Finalize

MPI_Finalize()

Terminates an MPI execution environment.

For more, see the OpenMPI documentation.