added MCA parameter to limit number of ptls used
This commit was SVN r3490.
Этот коммит содержится в:
родитель
4c5d6417a2
Коммит
7148d50839
@ -28,6 +28,7 @@ struct mca_ptl_mx_component_t {
|
|||||||
int mx_debug; /**< debug level */
|
int mx_debug; /**< debug level */
|
||||||
uint32_t mx_filter; /**< filter assigned to application */
|
uint32_t mx_filter; /**< filter assigned to application */
|
||||||
uint32_t mx_num_ptls; /**< number of MX NICs available to app */
|
uint32_t mx_num_ptls; /**< number of MX NICs available to app */
|
||||||
|
uint32_t mx_max_ptls; /**< max number of MX NICs to use */
|
||||||
struct mca_ptl_mx_module_t** mx_ptls; /**< array of available PTL moduless */
|
struct mca_ptl_mx_module_t** mx_ptls; /**< array of available PTL moduless */
|
||||||
ompi_free_list_t mx_send_frags; /**< free list of mx send fragments */
|
ompi_free_list_t mx_send_frags; /**< free list of mx send fragments */
|
||||||
ompi_free_list_t mx_recv_frags; /**< free list of mx recv fragments */
|
ompi_free_list_t mx_recv_frags; /**< free list of mx recv fragments */
|
||||||
|
@ -102,6 +102,8 @@ int mca_ptl_mx_component_open(void)
|
|||||||
mca_ptl_mx_param_register_int("free_list_max", -1);
|
mca_ptl_mx_param_register_int("free_list_max", -1);
|
||||||
mca_ptl_mx_component.mx_free_list_inc =
|
mca_ptl_mx_component.mx_free_list_inc =
|
||||||
mca_ptl_mx_param_register_int("free_list_inc", 256);
|
mca_ptl_mx_param_register_int("free_list_inc", 256);
|
||||||
|
mca_ptl_mx_component.mx_max_ptls =
|
||||||
|
(uint32_t)mca_ptl_mx_param_register_int("num_nics", -1);
|
||||||
mca_ptl_mx_module.super.ptl_exclusivity =
|
mca_ptl_mx_module.super.ptl_exclusivity =
|
||||||
mca_ptl_mx_param_register_int("exclusivity", 0);
|
mca_ptl_mx_param_register_int("exclusivity", 0);
|
||||||
mca_ptl_mx_module.super.ptl_first_frag_size =
|
mca_ptl_mx_module.super.ptl_first_frag_size =
|
||||||
@ -154,7 +156,7 @@ mca_ptl_base_module_t** mca_ptl_mx_component_init(
|
|||||||
mca_ptl_base_module_t** ptls;
|
mca_ptl_base_module_t** ptls;
|
||||||
*num_ptls = 0;
|
*num_ptls = 0;
|
||||||
*allow_multi_user_threads = true;
|
*allow_multi_user_threads = true;
|
||||||
*have_hidden_threads = OMPI_HAVE_THREADS;
|
*have_hidden_threads = true; /* MX driver/callbacks are multi-threaded */
|
||||||
|
|
||||||
ompi_free_list_init(&mca_ptl_mx_component.mx_send_frags,
|
ompi_free_list_init(&mca_ptl_mx_component.mx_send_frags,
|
||||||
sizeof(mca_ptl_mx_send_frag_t),
|
sizeof(mca_ptl_mx_send_frag_t),
|
||||||
|
@ -56,6 +56,10 @@ int mca_ptl_mx_module_init(void)
|
|||||||
return OMPI_ERR_INIT;
|
return OMPI_ERR_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for limit on number of ptls */
|
||||||
|
if(mca_ptl_mx_component.mx_num_ptls > mca_ptl_mx_component.mx_max_ptls)
|
||||||
|
mca_ptl_mx_component.mx_num_ptls = mca_ptl_mx_component.mx_max_ptls;
|
||||||
|
|
||||||
/* allocate an array of pointers to ptls */
|
/* allocate an array of pointers to ptls */
|
||||||
mca_ptl_mx_component.mx_ptls = (mca_ptl_mx_module_t**)malloc(
|
mca_ptl_mx_component.mx_ptls = (mca_ptl_mx_module_t**)malloc(
|
||||||
sizeof(mca_ptl_mx_module_t*) * mca_ptl_mx_component.mx_num_ptls);
|
sizeof(mca_ptl_mx_module_t*) * mca_ptl_mx_component.mx_num_ptls);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user