OpenMPI  0.1.1
btl_self.h File Reference
#include "ompi_config.h"
#include "opal/mca/event/event.h"
#include "ompi/class/ompi_free_list.h"
#include "ompi/mca/btl/btl.h"
#include "ompi/mca/btl/base/base.h"

Go to the source code of this file.

Data Structures

struct  mca_btl_self_component_t
 Shared Memory (SELF) BTL module. More...
 

Typedefs

typedef struct
mca_btl_self_component_t 
mca_btl_self_component_t
 

Functions

int mca_btl_self_component_open (void)
 Register shared memory module parameters with the MCA framework.
 
int mca_btl_self_component_close (void)
 Any final cleanup before being unloaded.
 
mca_btl_base_module_t ** mca_btl_self_component_init (int *num_btls, bool enable_progress_threads, bool enable_mpi_threads)
 SELF module initialization. More...
 
int mca_btl_self_finalize (struct mca_btl_base_module_t *btl)
 Cleanup any resources held by the BTL. More...
 
int mca_btl_self_add_procs (struct mca_btl_base_module_t *btl, size_t nprocs, struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers, struct opal_bitmap_t *reachability)
 PML->BTL notification of change in the process list. More...
 
int mca_btl_self_del_procs (struct mca_btl_base_module_t *btl, size_t nprocs, struct ompi_proc_t **procs, struct mca_btl_base_endpoint_t **peers)
 PML->BTL notification of change in the process list. More...
 
mca_btl_base_descriptor_tmca_btl_self_alloc (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, uint8_t order, size_t size, uint32_t flags)
 Allocate a segment. More...
 
int mca_btl_self_free (struct mca_btl_base_module_t *btl, mca_btl_base_descriptor_t *segment)
 Return a segment allocated by this BTL. More...
 
struct mca_btl_base_descriptor_tmca_btl_self_prepare_src (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, struct mca_mpool_base_registration_t *registration, struct opal_convertor_t *convertor, uint8_t order, size_t reserve, size_t *size, uint32_t flags)
 Pack data. More...
 
struct mca_btl_base_descriptor_tmca_btl_self_prepare_dst (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, struct mca_mpool_base_registration_t *registration, struct opal_convertor_t *convertor, uint8_t order, size_t reserve, size_t *size, uint32_t flags)
 Prepare data for RDMA. More...
 
int mca_btl_self_send (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, struct mca_btl_base_descriptor_t *descriptor, mca_btl_base_tag_t tag)
 Initiate a send to the peer. More...
 
int mca_btl_self_rdma (struct mca_btl_base_module_t *btl, struct mca_btl_base_endpoint_t *endpoint, struct mca_btl_base_descriptor_t *descriptor)
 Initiate a put to the peer. More...
 
int mca_btl_self_ft_event (int state)
 Fault Tolerance Event Notification Function. More...
 

Variables

OMPI_MODULE_DECLSPEC
mca_btl_self_component_t 
mca_btl_self_component
 
mca_btl_base_module_t mca_btl_self
 

Function Documentation

int mca_btl_self_add_procs ( struct mca_btl_base_module_t btl,
size_t  nprocs,
struct ompi_proc_t **  procs,
struct mca_btl_base_endpoint_t **  peers,
struct opal_bitmap_t reachability 
)

PML->BTL notification of change in the process list.

PML->BTL Notification that a receive fragment has been matched. Called for message that is send from process with the virtual address of the shared memory segment being different than that of the receiver.

Parameters
btl(IN)
proc(IN)
peer(OUT)
Returns
OMPI_SUCCESS or error status on failure.

References ompi_proc_local_proc, and opal_bitmap_set_bit().

mca_btl_base_descriptor_t* mca_btl_self_alloc ( struct mca_btl_base_module_t btl,
struct mca_btl_base_endpoint_t endpoint,
uint8_t  order,
size_t  size,
uint32_t  flags 
)
mca_btl_base_module_t** mca_btl_self_component_init ( int *  num_btls,
bool  enable_progress_threads,
bool  enable_mpi_threads 
)

SELF module initialization.

Parameters
num_btls(OUT) Number of BTLs returned in BTL array.
enable_progress_threads(IN) Flag indicating whether BTL is allowed to have progress threads
enable_mpi_threads(IN) Flag indicating whether BTL must support multilple simultaneous invocations from different threads

References mca_btl_base_module_t::btl_eager_limit, mca_btl_base_module_t::btl_max_send_size, mca_btl_self_component_t::free_list_inc, mca_btl_self_component_t::free_list_max, mca_btl_self_component_t::free_list_num, OBJ_CLASS, mca_btl_self_component_t::self_frags_eager, mca_btl_self_component_t::self_frags_rdma, and mca_btl_self_component_t::self_frags_send.

int mca_btl_self_del_procs ( struct mca_btl_base_module_t btl,
size_t  nprocs,
struct ompi_proc_t **  procs,
struct mca_btl_base_endpoint_t **  peers 
)

PML->BTL notification of change in the process list.

Parameters
btl(IN) BTL instance
proc(IN) Peer process
peer(IN) Peer addressing information.
Returns
Status indicating if cleanup was successful
int mca_btl_self_finalize ( struct mca_btl_base_module_t btl)

Cleanup any resources held by the BTL.

Parameters
btlBTL instance.
Returns
OMPI_SUCCESS or error status on failure.

Cleanup any resources held by the BTL.

Parameters
btl(IN) BTL module.

Prior to unloading a BTL module, the MCA framework will call the BTL finalize method of the module. Any resources held by the BTL should be released and if required the memory corresponding to the BTL module freed.

int mca_btl_self_free ( struct mca_btl_base_module_t btl,
mca_btl_base_descriptor_t des 
)
int mca_btl_self_ft_event ( int  state)

Fault Tolerance Event Notification Function.

Parameters
stateCheckpoint Stae
Returns
OMPI_SUCCESS or failure status
struct mca_btl_base_descriptor_t* mca_btl_self_prepare_dst ( struct mca_btl_base_module_t btl,
struct mca_btl_base_endpoint_t endpoint,
mca_mpool_base_registration_t registration,
struct opal_convertor_t convertor,
uint8_t  order,
size_t  reserve,
size_t *  size,
uint32_t  flags 
)
struct mca_btl_base_descriptor_t* mca_btl_self_prepare_src ( struct mca_btl_base_module_t btl,
struct mca_btl_base_endpoint_t endpoint,
mca_mpool_base_registration_t registration,
struct opal_convertor_t convertor,
uint8_t  order,
size_t  reserve,
size_t *  size,
uint32_t  flags 
)
int mca_btl_self_send ( struct mca_btl_base_module_t btl,
struct mca_btl_base_endpoint_t endpoint,
struct mca_btl_base_descriptor_t des,
mca_btl_base_tag_t  tag 
)

Initiate a send to the peer.

Parameters
btl(IN) BTL module
peer(IN) BTL peer addressing

We have to set the dst before the call to the function and reset them after.

References mca_btl_base_descriptor_t::des_cbfunc, mca_btl_base_descriptor_t::des_dst, mca_btl_base_descriptor_t::des_dst_cnt, mca_btl_base_descriptor_t::des_flags, mca_btl_base_descriptor_t::des_src, mca_btl_base_descriptor_t::des_src_cnt, and mca_btl_self_free().