Skip to content

Library and Context ​

UCC_jll.is_available Function
julia
is_available()

Return whether the artifact is available for the current platform.

source
julia
UCC.is_available() :: Bool

Is the UCC library available?

source
UCC.version Function
julia
UCC.version() :: VersionNumber

Get the version of the loaded UCC library.

source
UCC.version_string Function
julia
UCC.version_string() :: String

Get the version string of the loaded UCC library.

source
UCC.Library Type
julia
UCC.Library(; thread_mode, coll_types, reduction_types, sync_type,
            config::LibraryConfig) :: Library

Initialize a UCC library instance. Every keyword is optional and only passed to UCC when given:

  • thread_mode: :single, :funneled or :multiple (or the corresponding UCC_THREAD_* value)

  • coll_types: bitmask of UCC_COLL_TYPE_* the application will use

  • reduction_types: bitmask of 1 << UCC_OP_* the application will use

  • sync_type: UCC_NO_SYNC_COLLECTIVES or UCC_SYNC_COLLECTIVES

External links

  • ucc_init, ucc_lib_get_attr, ucc_finalize
source
UCC.LibraryConfig Type
julia
UCC.LibraryConfig(; env_prefix=nothing, filename=nothing) :: LibraryConfig

Read the UCC library configuration from the environment (variables prefixed by UCC_ or <env_prefix>_UCC_) and, optionally, a configuration file. Values can be changed with config[name] = value.

External links

  • ucc_lib_config_read, ucc_lib_config_modify
source
UCC.thread_mode Function
julia
UCC.thread_mode(lib::Library) :: LibUCC.ucc_thread_mode_t

The thread mode provided by lib.

source
UCC.attributes Method
julia
UCC.attributes(lib::Library) :: LibUCC.ucc_lib_attr_t

Query the attributes of lib selected by mask (by default the thread mode and supported collective types; UCC 1.8 does not report reduction or sync types).

source
UCC.Context Type
julia
UCC.Context([oob::AbstractOOB]; lib, type, sync_type, id,
            config::ContextConfig) :: Context

Create a UCC context. With an oob, the context is wired up with all OOB participants (this blocks until every rank has called Context); a Team can then be created over the same ranks with Team(ctx). Without lib, a default Library is created and destroyed together with the context.

Optional keywords (only passed to UCC when given):

  • type: UCC_CONTEXT_EXCLUSIVE or UCC_CONTEXT_SHARED

  • sync_type: UCC_NO_SYNC_COLLECTIVES or UCC_SYNC_COLLECTIVES

  • id: unique context id

External links

  • ucc_context_create, ucc_context_destroy
source
UCC.ContextConfig Type
julia
UCC.ContextConfig(lib::Library; filename=nothing) :: ContextConfig

Read the UCC context configuration for lib from the environment and, optionally, a configuration file. Values can be changed with config[name] = value (UCC core) or config[component, name] = value (a specific component, e.g. config["tl/ucp", "TUNE"] = "...").

External links

  • ucc_context_config_read, ucc_context_config_modify
source
UCC.progress Function
julia
UCC.progress(ctx::Context)

Progress outstanding operations on ctx. Blocking calls in this package progress the context themselves; this is only needed when polling nonblocking Requests manually.

External links

  • ucc_context_progress
source
UCC.attributes Method
julia
UCC.attributes(ctx::Context) :: LibUCC.ucc_context_attr_t

Query the type, sync type, address and global work buffer size of ctx.

source
UCC.address Function
julia
UCC.address(ctx::Context) :: Vector{UInt8}

The serialized address of ctx, which can be exchanged to create teams without an OOB.

source
UCC.work_buffer_size Function
julia
UCC.work_buffer_size(ctx::Context) :: Int

Size in bytes of the global work buffer that one-sided collectives require.

source

Cleanup ​

UCC.destroy Function
julia
UCC.destroy(x)

Release the UCC resources held by x (a Library, Context, Team, …). Resources of a parent object are only released once all of its children have been destroyed as well.

source
UCC.free_deferred Function
julia
UCC.free_deferred()

Release the UCC resources of objects that were garbage collected without an explicit UCC.destroy. Finalizers never call into UCC themselves (they may run on any thread, concurrently with UCC calls elsewhere), so call this from the task that drives UCC, while no other thread is using UCC.

Dropped collectives that are still in flight stay deferred until they complete.

source

Errors ​

UCC.LibUCC.UCCError Type
julia
UCCError(code::ucc_status_t)

A UCC call returned the error status code.

source