OpenMPI
0.1.1
|
BML Management Layer (BML) More...
#include "ompi_config.h"
#include "opal/mca/mca.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/mca/crs/crs.h"
#include "opal/mca/crs/base/base.h"
#include "opal/util/opal_sos.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/bml/base/bml_base_btl.h"
#include "ompi/types.h"
#include "ompi/constants.h"
Go to the source code of this file.
Data Structures | |
struct | mca_bml_base_btl_t |
struct | mca_bml_base_btl_array_t |
A dynamically growable array of mca_bml_base_btl_t instances. More... | |
struct | mca_bml_base_endpoint_t |
Structure associated w/ ompi_proc_t that contains the set of BTLs used to reach a destination. More... | |
struct | mca_bml_base_component_2_0_0_t |
BML component descriptor. More... | |
struct | mca_bml_base_module_t |
BML module interface functions and attributes. More... | |
Macros | |
#define | OPAL_ENABLE_DEBUG_RELIABILITY 0 |
#define | MCA_BML_BASE_VERSION_2_0_0 |
Typedefs | |
typedef struct mca_bml_base_btl_t | mca_bml_base_btl_t |
typedef struct mca_bml_base_btl_array_t | mca_bml_base_btl_array_t |
typedef struct mca_bml_base_endpoint_t | mca_bml_base_endpoint_t |
typedef struct mca_bml_base_module_t *(* | mca_bml_base_component_init_fn_t )(int *priority, bool enable_progress_threads, bool enable_mpi_threads) |
MCA->BML Initializes the BML component and creates specific BML module(s). More... | |
typedef struct mca_bml_base_component_2_0_0_t | mca_bml_base_component_2_0_0_t |
typedef struct mca_bml_base_component_2_0_0_t | mca_bml_base_component_t |
typedef int(* | mca_bml_base_module_finalize_fn_t )(void) |
MCA->BML Clean up any resources held by BML module before the module is unloaded. More... | |
typedef int(* | mca_bml_base_module_add_procs_fn_t )(size_t nprocs, struct ompi_proc_t **procs, struct opal_bitmap_t *reachable) |
PML->BML notification of change in the process list. More... | |
typedef int(* | mca_bml_base_module_del_procs_fn_t )(size_t nprocs, struct ompi_proc_t **procs) |
Notification of change to the process list. More... | |
typedef int(* | mca_bml_base_module_add_btl_fn_t )(struct mca_btl_base_module_t *) |
Notification of change to the btl list. More... | |
typedef int(* | mca_bml_base_module_del_btl_fn_t )(struct mca_btl_base_module_t *) |
Notification of change to the btl list. More... | |
typedef int(* | mca_bml_base_module_del_proc_btl_fn_t )(struct ompi_proc_t *, struct mca_btl_base_module_t *) |
Notification of change to the btl list. More... | |
typedef int(* | mca_bml_base_module_register_fn_t )(mca_btl_base_tag_t tag, mca_btl_base_module_recv_cb_fn_t cbfunc, void *cbdata) |
Register a callback function that is called on receipt of a fragment. More... | |
typedef int(* | mca_bml_base_module_register_error_cb_fn_t )(mca_btl_base_module_error_cb_fn_t cbfunc) |
Register a callback function that is called of error. More... | |
typedef int(* | mca_bml_base_module_ft_event_fn_t )(int status) |
Fault Tolerance Event Notification Function. More... | |
typedef struct mca_bml_base_module_t | mca_bml_base_module_t |
Functions | |
OMPI_DECLSPEC | OBJ_CLASS_DECLARATION (mca_bml_base_btl_array_t) |
static size_t | mca_bml_base_btl_array_get_size (mca_bml_base_btl_array_t *array) |
If required, reallocate (grow) the array to the indicate size. More... | |
static void | mca_bml_base_btl_array_set_size (mca_bml_base_btl_array_t *array, size_t size) |
Grow the array if required, and set the size. More... | |
static mca_bml_base_btl_t * | mca_bml_base_btl_array_insert (mca_bml_base_btl_array_t *array) |
Grow the array size by one and return the item at that index. More... | |
static bool | mca_bml_base_btl_array_remove (mca_bml_base_btl_array_t *array, struct mca_btl_base_module_t *btl) |
Remove a btl from a bml_btl. More... | |
static mca_bml_base_btl_t * | mca_bml_base_btl_array_get_index (mca_bml_base_btl_array_t *array, size_t item_index) |
Return an array item at the specified index. More... | |
static mca_bml_base_btl_t * | mca_bml_base_btl_array_get_next (mca_bml_base_btl_array_t *array) |
Return the next LRU index in the array. More... | |
static mca_bml_base_btl_t * | mca_bml_base_btl_array_find (mca_bml_base_btl_array_t *array, struct mca_btl_base_module_t *btl) |
Locate an element in the array. More... | |
OMPI_DECLSPEC | OBJ_CLASS_DECLARATION (mca_bml_base_endpoint_t) |
static void | mca_bml_base_alloc (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t **des, uint8_t order, size_t size, uint32_t flags) |
static void | mca_bml_base_free (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t *des) |
static int | mca_bml_base_send (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t *des, mca_btl_base_tag_t tag) |
static int | mca_bml_base_send_status (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t *des, mca_btl_base_tag_t tag) |
static int | mca_bml_base_sendi (mca_bml_base_btl_t *bml_btl, struct opal_convertor_t *convertor, void *header, size_t header_size, size_t payload_size, uint8_t order, uint32_t flags, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t **descriptor) |
static int | mca_bml_base_put (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t *des) |
static int | mca_bml_base_get (mca_bml_base_btl_t *bml_btl, mca_btl_base_descriptor_t *des) |
static void | mca_bml_base_prepare_src (mca_bml_base_btl_t *bml_btl, mca_mpool_base_registration_t *reg, struct opal_convertor_t *conv, uint8_t order, size_t reserve, size_t *size, uint32_t flags, mca_btl_base_descriptor_t **des) |
static void | mca_bml_base_prepare_dst (mca_bml_base_btl_t *bml_btl, mca_mpool_base_registration_t *reg, struct opal_convertor_t *conv, uint8_t order, size_t reserve, size_t *size, uint32_t flags, mca_btl_base_descriptor_t **des) |
BML Management Layer (BML)
#define MCA_BML_BASE_VERSION_2_0_0 |
typedef struct mca_bml_base_module_t*(* mca_bml_base_component_init_fn_t)(int *priority, bool enable_progress_threads, bool enable_mpi_threads) |
MCA->BML Initializes the BML component and creates specific BML module(s).
num_bmls | (OUT) Returns the number of bml modules created, or 0 if the transport is not available. |
enable_progress_threads | (IN) Whether this component is allowed to run a hidden/progress thread or not. |
enable_mpi_threads | (IN) Whether support for multiple MPI threads is enabled or not (i.e., MPI_THREAD_MULTIPLE), which indicates whether multiple threads may invoke this component simultaneously or not. |
During component initialization, the BML component should discover the physical devices that are available for the given transport, and create a BML module to represent each device. Any addressing information required by peers to reach the device should be published during this function via the mca_base_modex_send() interface.
typedef int(* mca_bml_base_module_add_btl_fn_t)(struct mca_btl_base_module_t *) |
Notification of change to the btl list.
bml | (IN) BTL module |
On recovery of a btl, add it to the set of forwarding entries used by the BML.
typedef int(* mca_bml_base_module_add_procs_fn_t)(size_t nprocs, struct ompi_proc_t **procs, struct opal_bitmap_t *reachable) |
PML->BML notification of change in the process list.
nprocs | (IN) Number of processes |
procs | (IN) Set of processes |
reachable | (OUT) Bitmask indicating set of peer processes that are reachable by this BML. |
The mca_bml_base_module_add_procs_fn_t() is called by the PML to determine the set of BMLs that should be used to reach each process. Any addressing information exported by the peer via the mca_base_modex_send() function should be available during this call via the corresponding mca_base_modex_recv() function. The BML may utilize this information to determine reachability of each peer process.
For each process that is reachable by the BML, the bit corresponding to the index into the proc array (nprocs) should be set in the reachable bitmask. The PML provides the BML the option to return a pointer to a data structure defined by the BML that is returned to the BML on subsequent calls to the BML data transfer functions (e.g bml_send). This may be used by the BML to cache any addressing or connection information (e.g. TCP socket, IP queue pair).
typedef int(* mca_bml_base_module_del_btl_fn_t)(struct mca_btl_base_module_t *) |
Notification of change to the btl list.
bml | (IN) BTL module |
On failure of a btl, remove it from the set of forwarding entries used by the BML.
typedef int(* mca_bml_base_module_del_proc_btl_fn_t)(struct ompi_proc_t *, struct mca_btl_base_module_t *) |
Notification of change to the btl list.
bml | (IN) BTL module |
On failure of a btl, remove it from the set of forwarding entries used by the BML.
typedef int(* mca_bml_base_module_del_procs_fn_t)(size_t nprocs, struct ompi_proc_t **procs) |
Notification of change to the process list.
nprocs | (IN) Number of processes |
proc | (IN) Set of processes |
When the process list changes, the PML notifies the BML of the change, to provide the opportunity to cleanup or release any resources associated with the peer.
typedef int(* mca_bml_base_module_finalize_fn_t)(void) |
MCA->BML Clean up any resources held by BML module before the module is unloaded.
bml | (IN) BML module. |
Prior to unloading a BML module, the MCA framework will call the BML finalize method of the module. Any resources held by the BML should be released and if required the memory corresponding to the BML module freed.
typedef int(* mca_bml_base_module_ft_event_fn_t)(int status) |
typedef int(* mca_bml_base_module_register_error_cb_fn_t)(mca_btl_base_module_error_cb_fn_t cbfunc) |
Register a callback function that is called of error.
bml | (IN) BML module |
typedef int(* mca_bml_base_module_register_fn_t)(mca_btl_base_tag_t tag, mca_btl_base_module_recv_cb_fn_t cbfunc, void *cbdata) |
Register a callback function that is called on receipt of a fragment.
bml | (IN) BML module |
When the process list changes, the PML notifies the BML of the change, to provide the opportunity to cleanup or release any resources associated with the peer.
|
inlinestatic |
Locate an element in the array.
array | (IN) |
index | (IN) |
References mca_bml_base_btl_array_t::arr_size, mca_bml_base_btl_array_t::bml_btls, and mca_bml_base_btl_t::btl.
Referenced by mca_pml_bfo_error_pending_packets().
|
inlinestatic |
Return an array item at the specified index.
array | (IN) |
item_index | (IN) |
References mca_bml_base_btl_array_t::arr_size, mca_bml_base_btl_array_t::bml_btls, and opal_output().
|
inlinestatic |
Return the next LRU index in the array.
array | (IN) |
index | (OUT) |
References mca_bml_base_btl_array_t::arr_index, mca_bml_base_btl_array_t::arr_size, mca_bml_base_btl_array_t::bml_btls, and opal_output().
Referenced by mca_pml_bfo_error_pending_packets(), mca_pml_bfo_recv_request_recverrnotify(), mca_pml_bfo_recv_request_rndvrestartack(), mca_pml_bfo_recv_request_rndvrestartnack(), mca_pml_bfo_repost_fin(), mca_pml_bfo_repost_match_fragment(), mca_pml_bfo_send_request_restart(), and mca_pml_bfo_send_request_rndvrestartnotify().
|
inlinestatic |
If required, reallocate (grow) the array to the indicate size.
array | (IN) |
size | (IN) |
References mca_bml_base_btl_array_t::arr_size.
Referenced by mca_pml_bfo_send_request_restart().
|
inlinestatic |
Grow the array size by one and return the item at that index.
array | (IN) |
References mca_bml_base_btl_array_t::arr_reserve, mca_bml_base_btl_array_t::arr_size, mca_bml_base_btl_array_t::bml_btls, and opal_output().
|
inlinestatic |
Remove a btl from a bml_btl.
array | (IN) |
btl | (IN) |
References mca_bml_base_btl_array_t::arr_index, mca_bml_base_btl_array_t::arr_size, mca_bml_base_btl_array_t::bml_btls, and mca_bml_base_btl_t::btl.
|
inlinestatic |
Grow the array if required, and set the size.
array | (IN) |
size | (IN) |
References mca_bml_base_btl_array_t::arr_reserve, and mca_bml_base_btl_array_t::arr_size.