Rmpi (version 0.6-9)

mpi.intercomm.merge: MPI\_Intercomm\_merge API

Description

Creates an intracommunicator from an intercommunicator

Usage

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

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

Value

1 if success. Otherwise 0.

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

http://www.openmpi.org/

See Also

mpi.comm.test.inter