Non-blocking receive of an array of values. This routine will initiate a request to receive data and then return immediately. The data may be received in the background. To test for or force the completion of the communication, then access the received data, use the returned ReceiveRequest object.

Important: if the type T is a value type (e.g., a primitive type or a struct of primitive types), then the values array must be pre-allocated with enough storage to store all of the values that will be received. If the message contains more data than can be received into the array, this method will throw a MessageTruncatedException or, in some cases, crash. Providing an array that is longer than the received message is allowable; to determine the actual amount of data received, retrieve the message length from the CompletedStatus structure provided when the request is completed.

Namespace:  MPI
Assembly:  MPI (in MPI.dll)
Version: (


public ReceiveRequest ImmediateReceive<T>(
	int source,
	int tag,
	T[] values
Visual Basic (Declaration)
Public Function ImmediateReceive(Of T) ( _
	source As Integer, _
	tag As Integer, _
	values As T() _
) As ReceiveRequest
Visual C++
generic<typename T>
ReceiveRequest^ ImmediateReceive(
	int source, 
	int tag, 
	array<T>^ values


Type: System..::.Int32
Rank of the source process to receive data from. Alternatively, use anySource to receive a message from any other process.
Type: System..::.Int32
The tag that identifies the message to be received. Alternatively, use anyTag to receive a message with any tag.
Type: array< T >[]()[]
An array into which the values will be received. This array must be large enough to accommodate all of the data sent by the source process.

Type Parameters

Any serializable type.

Return Value

A request object that allows one to test or force the completion of this receive request, and retrieve the resulting value. The object retrieved from the request object will be values.

See Also