Skip to content

Out-of-Band ​

UCC.AbstractOOB Type
julia
UCC.AbstractOOB

Out-of-band transport used by UCC to bootstrap Contexts and Teams. Subtypes must be mutable (UCC holds a pointer to them) and implement

  • UCC.oob_rank(oob) :: Integer – 0-based index of the calling process,

  • UCC.oob_size(oob) :: Integer – number of participating processes,

and either the blocking

  • UCC.allgather(oob, data::Vector{UInt8}) :: Vector{UInt8} – concatenation of data from all ranks, in rank order,

or the nonblocking pair

  • UCC.allgather_start(oob, src::Ptr{UInt8}, dst::Ptr{UInt8}, nbytes) -> handle

  • UCC.allgather_test(oob, handle) :: Bool

(plus optionally UCC.allgather_free(oob, handle)).

The MPI extension (using MPI) provides UCC.MPIOOB(comm).

source
UCC.LocalOOB Type
julia
UCC.LocalOOB(n) :: Vector{LocalOOB}

In-process OOB for n ranks living in the same Julia process (one task per rank). Returns one endpoint per rank. Useful for testing and for driving several devices from a single process.

When the rank tasks may run on different threads, every UCC library alive in the process must be thread-safe (UCC.Library(thread_mode=:multiple)): UCC shares global state between library instances, and a single live UCC_THREAD_SINGLE library is enough for concurrent collectives to hang or crash.

Examples

julia
oobs = UCC.LocalOOB(2)
teams = fetch.([Threads.@spawn begin
                    lib = UCC.Library(thread_mode=:multiple)
                    UCC.Team(UCC.Context(oob; lib))
                end for oob in oobs])
source
UCC.MPIOOB Function
julia
UCC.MPIOOB(comm::MPI.Comm) :: AbstractOOB

OOB transport over an MPI communicator. Available after using MPI.

source