Learn R Programming

Rmpi (version 0.7-2.1)

mpi.intercomm.merge: MPI_Intercomm_merge API

Description

Creates an intracommunicator from an intercommunicator

Usage

mpi.intercomm.merge(intercomm=2, high=0, comm=1)

Value

1 if success. Otherwise 0.

Arguments

intercomm

an intercommunicator number

high

Used to order the groups of the two intracommunicators within comm when creating the new communicator

comm

a (intra)communicator number

Author

Hao Yu

Details

When master spawns slaves, an intercommunicator is created. To make communications (point-to-point or groupwise) among master and slaves, an intracommunicator must be created. mpi.intercomm.merge is used for that purpose. This is a collective call so all master and slaves call together. R slaves spawned by mpi.spawn.Rslaves should use mpi.comm.get.parent to get (set) an intercomm to a number followed by merging antercomm to an intracomm. One can use mpi.comm.test.inter to test if a communicator is an intercommunicator or not.

References

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

See Also

mpi.comm.test.inter