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 */
|
||||
uint32_t mx_filter; /**< filter assigned to application */
|
||||
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 */
|
||||
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 */
|
||||
|
@ -102,6 +102,8 @@ int mca_ptl_mx_component_open(void)
|
||||
mca_ptl_mx_param_register_int("free_list_max", -1);
|
||||
mca_ptl_mx_component.mx_free_list_inc =
|
||||
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_param_register_int("exclusivity", 0);
|
||||
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;
|
||||
*num_ptls = 0;
|
||||
*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,
|
||||
sizeof(mca_ptl_mx_send_frag_t),
|
||||
|
@ -42,7 +42,7 @@ int mca_ptl_mx_module_init(void)
|
||||
ompi_output(0, "mca_ptl_mx_init: mx_get_info(MX_NIC_COUNT) failed with status=%d\n", status);
|
||||
return OMPI_ERR_INIT;
|
||||
}
|
||||
|
||||
|
||||
/* determine the NIC ids */
|
||||
size = sizeof(uint64_t) * (mca_ptl_mx_component.mx_num_ptls+1);
|
||||
if(NULL == (nic_addrs = (uint64_t*)malloc(size)))
|
||||
@ -56,6 +56,10 @@ int mca_ptl_mx_module_init(void)
|
||||
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 */
|
||||
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);
|
||||
|
@ -86,7 +86,7 @@ static inline void MCA_PTL_MX_SEND_FRAG_PROGRESS(mca_ptl_mx_send_frag_t* frag)
|
||||
MCA_PTL_MX_SEND_FRAG_RETURN(frag);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Done when:
|
||||
* (1) send completes and ack is received
|
||||
* (2) send completes and ack is not required
|
||||
@ -97,13 +97,13 @@ static inline void MCA_PTL_MX_SEND_FRAG_PROGRESS(mca_ptl_mx_send_frag_t* frag)
|
||||
|
||||
if((frag_ack == true && frag_progress == 2) ||
|
||||
(frag_ack == false && frag_progress == 1)) {
|
||||
|
||||
|
||||
/* update request status */
|
||||
frag->frag_send.frag_base.frag_owner->ptl_send_progress(
|
||||
frag->frag_send.frag_base.frag_owner,
|
||||
request,
|
||||
frag->frag_send.frag_base.frag_size);
|
||||
|
||||
|
||||
/* return any fragment that didnt come from the cache */
|
||||
if (request->req_cached == false ||
|
||||
frag->frag_send.frag_base.frag_header.hdr_frag.hdr_frag_offset != 0) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user