29 #include "ompi_config.h"
31 #include "opal/datatype/opal_convertor.h"
33 #include "opal/mca/crs/base/base.h"
34 #include "opal/util/opal_sos.h"
38 #include "ompi/mca/bml/base/bml_base_btl.h"
39 #include "ompi/types.h"
41 #include "ompi/constants.h"
43 #define OPAL_ENABLE_DEBUG_RELIABILITY 0
105 mca_bml_base_btl_array_reserve(array, size);
116 #if OPAL_ENABLE_DEBUG
118 opal_output(0,
"mca_bml_base_btl_array_insert: invalid array index %lu >= %lu",
137 for( i = 0; i < array->
arr_size; i++ ) {
140 for( ; i < array->
arr_size-1; i++ ) {
162 #if OPAL_ENABLE_DEBUG
164 opal_output(0,
"mca_bml_base_btl_array_get_index: invalid array index %lu >= %lu",
165 (
unsigned long)item_index, (
unsigned long)array->
arr_size);
169 return &array->
bml_btls[item_index];
181 #if OPAL_ENABLE_DEBUG
183 opal_output(0,
"mca_bml_base_btl_array_get_next: invalid array size");
190 size_t current_position = array->
arr_index;
191 if( (current_position + 1) == array->
arr_size ) {
196 return &array->
bml_btls[current_position];
241 uint8_t order,
size_t size, uint32_t flags )
244 *des = btl->btl_alloc(btl, bml_btl->
btl_endpoint, order, size, flags);
252 btl->btl_free( btl, des );
258 #if OPAL_ENABLE_DEBUG_RELIABILITY
262 mca_btl_base_tag_t tag );
269 mca_btl_base_tag_t tag )
275 rc = btl->btl_send(btl, bml_btl->
btl_endpoint, des, tag);
276 if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_RESOURCE_BUSY)
286 mca_btl_base_tag_t tag )
291 return btl->btl_send(btl, bml_btl->
btl_endpoint, des, tag);
301 mca_btl_base_tag_t tag,
306 convertor, header, header_size,
307 payload_size, order, flags, tag, descriptor);
340 *des = btl->btl_prepare_src( btl, bml_btl->
btl_endpoint, reg, conv,
341 order, reserve, size, flags );
342 if( OPAL_LIKELY((*des) != NULL) ) {
343 (*des)->des_context = (
void*) bml_btl;
358 *des = btl->btl_prepare_dst( btl, bml_btl->
btl_endpoint, reg, conv,
359 order, reserve, size, flags );
360 if( OPAL_LIKELY((*des) != NULL) ) {
361 (*des)->des_context = (
void*) bml_btl;
397 bool enable_progress_threads,
398 bool enable_mpi_threads
529 mca_btl_base_tag_t tag,
577 #define MCA_BML_BASE_VERSION_2_0_0 \
578 MCA_BASE_VERSION_2_0_0, \
uint32_t btl_flags_or
the bitwise OR of the btl flags
Definition: bml.h:232
float btl_weight
BTL weight for scheduling.
Definition: bml.h:60
size_t arr_reserve
size of allocated btl_proc array
Definition: bml.h:76
Common type for all MCA components.
Definition: mca.h:250
A descriptor that holds the parameters to a send/put/get operation along w/ a callback routine that i...
Definition: btl.h:275
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.
Definition: bml.h:160
BML module interface functions and attributes.
Definition: bml.h:555
uint32_t btl_flags
support for put/get?
Definition: bml.h:59
void(* mca_btl_base_module_recv_cb_fn_t)(struct mca_btl_base_module_t *btl, mca_btl_base_tag_t tag, mca_btl_base_descriptor_t *descriptor, void *cbdata)
Callback function that is called asynchronously on receipt of data by the transport layer...
Definition: btl.h:391
Definition: opal_bitmap.h:53
int(* mca_bml_base_module_finalize_fn_t)(void)
MCA->BML Clean up any resources held by BML module before the module is unloaded. ...
Definition: bml.h:431
size_t btl_pipeline_send_length
max of pipeline send_length of available BTLs
Definition: bml.h:225
size_t arr_index
last used index
Definition: bml.h:77
size_t btl_rdma_index
index of last used BTL for RDMA
Definition: bml.h:231
size_t btl_max_send_size
min of max send size for available send btls
Definition: bml.h:227
void(* mca_btl_base_module_error_cb_fn_t)(struct mca_btl_base_module_t *btl, int32_t flags, struct ompi_proc_t *errproc, char *btlinfo)
Callback function that is called asynchronously on receipt of an error from the transport layer...
Definition: btl.h:538
int(* mca_bml_base_module_del_btl_fn_t)(struct mca_btl_base_module_t *)
Notification of change to the btl list.
Definition: bml.h:502
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.
Definition: bml.h:102
int(* mca_bml_base_module_ft_event_fn_t)(int status)
Fault Tolerance Event Notification Function.
Definition: bml.h:549
Remote Open MPI process structure.
Definition: proc.h:56
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.
Definition: bml.h:460
mca_bml_base_btl_array_t btl_rdma
array of btls that support (prefer) rdma
Definition: bml.h:230
struct mca_btl_base_endpoint_t * btl_endpoint
BTL addressing info.
Definition: bml.h:62
Top-level interface for all MCA components.
Definition: opal_list.h:98
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).
Definition: bml.h:395
void * des_context
more opaque callback data
Definition: btl.h:283
mca_bml_base_btl_t * bml_btls
array of bml btl's
Definition: bml.h:78
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.
Definition: bml.h:540
struct ompi_proc_t * btl_proc
backpointer to target ompi_proc_t
Definition: bml.h:224
OPAL_DECLSPEC void opal_output(int output_id, const char *format,...) __opal_attribute_format__(__printf__
Main function to send output to a stream.
Byte Transfer Layer (BTL)
size_t btl_send_limit
max of min rdma pipeline for available rmda btls
Definition: bml.h:226
BML component descriptor.
Definition: bml.h:406
mca_bml_base_btl_array_t btl_eager
array of btls to use for first fragments
Definition: bml.h:228
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.
Definition: bml.h:114
State of ELAN endpoint connection.
Definition: btl_elan_endpoint.h:33
Structure associated w/ ompi_proc_t that contains the set of BTLs used to reach a destination...
Definition: bml.h:222
Base object.
Definition: opal_object.h:182
Definition: opal_convertor.h:90
mca_bml_base_component_t * bml_component
pointer back to the BML component structure
Definition: bml.h:557
Meta data for MCA v2.0.0 components.
Definition: mca.h:309
struct mca_btl_base_module_t * btl
BTL module.
Definition: bml.h:61
mca_bml_base_btl_array_t btl_send
array of btls to use for remaining fragments
Definition: bml.h:229
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.
Definition: bml.h:206
size_t arr_size
number available
Definition: bml.h:75
int(* mca_bml_base_module_add_btl_fn_t)(struct mca_btl_base_module_t *)
Notification of change to the btl list.
Definition: bml.h:491
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.
Definition: bml.h:132
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.
Definition: bml.h:91
Checkpoint and Restart Service (CRS) Interface.
BTL module interface functions and attributes.
Definition: btl.h:786
opal_list_item_t super
base_endpoint is a list item
Definition: bml.h:223
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.
Definition: bml.h:513
A dynamically growable array of mca_bml_base_btl_t instances.
Definition: bml.h:73
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.
Definition: bml.h:528
#define OBJ_CLASS_DECLARATION(NAME)
Declaration for class descriptor.
Definition: opal_object.h:236
int(* mca_bml_base_module_del_procs_fn_t)(size_t nprocs, struct ompi_proc_t **procs)
Notification of change to the process list.
Definition: bml.h:477
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.
Definition: bml.h:179
Definition: mpool_fake.h:38