MTL MXM: Adding MXM version protect for Mprobe, Mrecv resources.
This commit was SVN r26922.
Этот коммит содержится в:
родитель
dccfd18481
Коммит
c386847d9a
@ -400,8 +400,10 @@ int ompi_mtl_mxm_progress(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if MXM_API >= 0x01010000
|
||||
OBJ_CLASS_INSTANCE(
|
||||
ompi_mtl_mxm_message_t,
|
||||
ompi_free_list_item_t,
|
||||
NULL,
|
||||
NULL);
|
||||
#endif
|
||||
|
@ -84,6 +84,7 @@ extern int ompi_mtl_mxm_finalize(struct mca_mtl_base_module_t* mtl);
|
||||
|
||||
int ompi_mtl_mxm_module_init(void);
|
||||
|
||||
#if MXM_API >= 0x01010000
|
||||
struct ompi_mtl_mxm_message_t {
|
||||
ompi_free_list_item_t super;
|
||||
|
||||
@ -96,6 +97,7 @@ struct ompi_mtl_mxm_message_t {
|
||||
};
|
||||
typedef struct ompi_mtl_mxm_message_t ompi_mtl_mxm_message_t;
|
||||
OBJ_CLASS_DECLARATION(ompi_mtl_mxm_message_t);
|
||||
#endif
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
@ -82,7 +82,6 @@ static int ompi_mtl_mxm_component_register(void)
|
||||
|
||||
static int ompi_mtl_mxm_component_open(void)
|
||||
{
|
||||
int rc;
|
||||
mxm_error_t err;
|
||||
|
||||
mca_mtl_mxm_output = opal_output_open(NULL);
|
||||
@ -100,6 +99,10 @@ static int ompi_mtl_mxm_component_open(void)
|
||||
return OPAL_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
#if MXM_API >= 0x01010000
|
||||
{
|
||||
int rc;
|
||||
|
||||
OBJ_CONSTRUCT(&mca_mtl_mxm_component.mxm_messages, ompi_free_list_t);
|
||||
rc = ompi_free_list_init_new(&mca_mtl_mxm_component.mxm_messages,
|
||||
sizeof(ompi_mtl_mxm_message_t),
|
||||
@ -115,6 +118,8 @@ static int ompi_mtl_mxm_component_open(void)
|
||||
mxm_error_string(err));
|
||||
return OPAL_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -123,7 +128,11 @@ static int ompi_mtl_mxm_component_close(void)
|
||||
{
|
||||
mxm_cleanup(ompi_mtl_mxm.mxm_context);
|
||||
ompi_mtl_mxm.mxm_context = NULL;
|
||||
|
||||
#if MXM_API >= 0x01010000
|
||||
OBJ_DESTRUCT(&mca_mtl_mxm_component.mxm_messages);
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,11 @@ extern mca_mtl_mxm_module_t ompi_mtl_mxm;
|
||||
|
||||
typedef struct mca_mtl_mxm_component_t {
|
||||
mca_mtl_base_component_2_0_0_t super; /**< base MTL component */
|
||||
|
||||
#if MXM_API >= 0x01010000
|
||||
ompi_free_list_t mxm_messages; /* will be used for MPI_Mprobe and MPI_Mrecv calls */
|
||||
#endif
|
||||
|
||||
} mca_mtl_mxm_component_t;
|
||||
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user