mpi.send.Robj: Extensions of MPI_Send and MPI_Recv APIs

View source: R/Rcoll.R

mpi.send.RobjR Documentation

Extensions of MPI_Send and MPI_Recv APIs

Description

mpi.send.Robj and mpi.recv.Robj are two extensions of mpi.send and mpi.recv. They are used to transmit a general R object from any source to any destination.

mpi.isend.Robj is a nonblocking version of mpi.send.Robj.

Usage

mpi.send.Robj(obj, dest, tag, comm = 1)
mpi.isend.Robj(obj, dest, tag, comm = 1, request=0)
mpi.recv.Robj(source, tag, comm = 1, status = 0)

Arguments

obj

an R object. Can be any R object.

dest

the destination rank.

source

the source rank or mpi.any.source() for any source.

tag

non-negative integer or mpi.any.tag() for any tag.

comm

a communicator number.

request

a request number.

status

a status number.

Details

mpi.send.Robj and mpi.isend.Robj use serialize to encode an R object into a binary char vector. It sends the message to the destination. The receiver decode the message back into an R object by using unserialize.

If mpi.isend.Robj is used, mpi.wait or mpi.test must be used to check the object has been sent.

Value

mpi.send.Robj or mpi.isend.Robj return no value. mpi.recv.Robj returns the the transmitted R object.

Author(s)

Hao Yu

References

https://www.open-mpi.org/

See Also

mpi.send, mpi.recv, mpi.wait, serialize, unserialize,


Rmpi documentation built on April 1, 2023, 12:20 a.m.

Related to mpi.send.Robj in Rmpi...