UCC 1.0
Unified Collective Communications
Library initialization and finalization routines

Functions

ucc_status_t ucc_lib_config_read (const char *env_prefix, const char *filename, ucc_lib_config_h *config)
 The ucc_lib_config_read routine provides a method to read library configuration from the environment and create configuration descriptor. More...
 
void ucc_lib_config_release (ucc_lib_config_h config)
 The ucc_lib_config_release routine releases the configuration descriptor. More...
 
void ucc_lib_config_print (const ucc_lib_config_h config, FILE *stream, const char *title, ucc_config_print_flags_t print_flags)
 The ucc_lib_config_print routine prints the configuration information. More...
 
ucc_status_t ucc_lib_config_modify (ucc_lib_config_h config, const char *name, const char *value)
 The ucc_lib_config_modify routine modifies the runtime configuration as described by the descriptor. More...
 
static ucc_status_t ucc_init (const ucc_lib_params_t *params, const ucc_lib_config_h config, ucc_lib_h *lib_p)
 The ucc_init initializes the UCC library. More...
 
ucc_status_t ucc_finalize (ucc_lib_h lib_p)
 The ucc_finalize routine finalizes the UCC library. More...
 
ucc_status_t ucc_lib_get_attr (ucc_lib_h lib_p, ucc_lib_attr_t *lib_attr)
 The ucc_lib_get_attr routine queries the library attributes. More...
 

Detailed Description

Library initialization and finalization routines

Function Documentation

◆ ucc_lib_config_read()

ucc_status_t ucc_lib_config_read ( const char *  env_prefix,
const char *  filename,
ucc_lib_config_h config 
)
Parameters
[out]env_prefixIf not NULL, the routine searches for the environment variables with the prefix UCC_<env_prefix>. Otherwise, the routines search for the environment variables that start with the prefix @ UCC_.
[in]filenameIf not NULL, read configuration values from the file defined by filename. If the file does not exist, it will be ignored and no error will be reported to the user.
[out]configPointer to configuration descriptor as defined by ucc_lib_config_h.

Description

ucc_lib_config_read allocates the ucc_lib_config_h handle and fetches the configuration values from the run-time environment. The run-time environment supported are environment variables or a configuration file.

Returns
Error code as defined by ucc_status_t

◆ ucc_lib_config_release()

void ucc_lib_config_release ( ucc_lib_config_h  config)
Parameters
[in]configPointer to the configuration descriptor to be released. Configuration descriptor as defined by ucc_lib_config_h.

Description

The routine releases the configuration descriptor that was allocated through

ucc_lib_config_read() routine.

◆ ucc_lib_config_print()

void ucc_lib_config_print ( const ucc_lib_config_h  config,
FILE *  stream,
const char *  title,
ucc_config_print_flags_t  print_flags 
)
Parameters
[in]configucc_lib_config_h "Configuration descriptor" to print.
[in]streamOutput stream to print the configuration to.
[in]titleConfiguration title to print.
[in]print_flagsFlags that control various printing options.

Description

The routine prints the configuration information that is stored in ucc_lib_config_h "configuration" descriptor.

◆ ucc_lib_config_modify()

ucc_status_t ucc_lib_config_modify ( ucc_lib_config_h  config,
const char *  name,
const char *  value 
)
Parameters
[in]configPointer to the configuration descriptor to be modified
[in]nameConfiguration variable to be modified
[in]valueConfiguration value to set

Description

The ucc_lib_config_modify routine sets the value of identifier "name" to "value".

Returns
Error code as defined by ucc_status_t

◆ ucc_init()

static ucc_status_t ucc_init ( const ucc_lib_params_t params,
const ucc_lib_config_h  config,
ucc_lib_h lib_p 
)
inlinestatic
Parameters
[in]paramsuser provided parameters to customize the library functionality
[in]configUCC configuration descriptor allocated through ucc_config_read() routine.
[out]lib_pUCC library handle

Description

A local operation to initialize and allocate the resources for the UCC operations. The parameters passed using the ucc_lib_params_t and ucc_lib_config_h structures will customize and select the functionality of the UCC library. The library can be customized for its interaction with the user threads, types of collective operations, and reductions supported. On success, the library object will be created and ucc_status_t will return UCC_OK. On error, the library object will not be created and corresponding error code as defined by ucc_status_t is returned.

Returns
Error code as defined by ucc_status_t

◆ ucc_finalize()

ucc_status_t ucc_finalize ( ucc_lib_h  lib_p)
Parameters
[in]lib_pHandle to ucc_lib_h "UCC library".

Description

A local operation to release the resources and cleanup. All participants that invoked ucc_init should call this routine.

Returns
Error code as defined by ucc_status_t

◆ ucc_lib_get_attr()

ucc_status_t ucc_lib_get_attr ( ucc_lib_h  lib_p,
ucc_lib_attr_t lib_attr 
)
Parameters
[out]lib_attrLibrary attributes
[in]lib_pInput library object

Description

A query operation to get the attributes of the library object. The attributes are library configured values and reflect the choices made by the library implementation.

Returns
Error code as defined by ucc_status_t