fix compilation warnings.
This commit was SVN r9515.
Этот коммит содержится в:
родитель
e371aff9f5
Коммит
b6ab1f4262
@ -199,11 +199,11 @@ int mca_btl_mvapi_component_open(void)
|
|||||||
8, &mca_btl_mvapi_component.srq_sd_max);
|
8, &mca_btl_mvapi_component.srq_sd_max);
|
||||||
|
|
||||||
mca_btl_mvapi_param_register_int("use_eager_rdma", "user RDMA for eager messages",
|
mca_btl_mvapi_param_register_int("use_eager_rdma", "user RDMA for eager messages",
|
||||||
0, &mca_btl_mvapi_component.use_eager_rdma);
|
0, (int*) &mca_btl_mvapi_component.use_eager_rdma);
|
||||||
if (mca_btl_mvapi_component.use_srq)
|
if (mca_btl_mvapi_component.use_srq)
|
||||||
mca_btl_mvapi_component.use_eager_rdma = 0;
|
mca_btl_mvapi_component.use_eager_rdma = 0;
|
||||||
mca_btl_mvapi_param_register_int("eager_rdma_threashold", "Open rdma channel for eager messages after this number of messages received from peer (zero to disable)",
|
mca_btl_mvapi_param_register_int("eager_rdma_threashold", "Open rdma channel for eager messages after this number of messages received from peer (zero to disable)",
|
||||||
100, &mca_btl_mvapi_component.eager_rdma_threashold);
|
100, (int*)&mca_btl_mvapi_component.eager_rdma_threashold);
|
||||||
mca_btl_mvapi_param_register_int("max_eager_rdma", "Maximum number of eager RDMA connections",
|
mca_btl_mvapi_param_register_int("max_eager_rdma", "Maximum number of eager RDMA connections",
|
||||||
16, (int*)&mca_btl_mvapi_component.max_eager_rdma);
|
16, (int*)&mca_btl_mvapi_component.max_eager_rdma);
|
||||||
mca_btl_mvapi_param_register_int("eager_rdma_num", "Number of RDMA buffers for eager messages",
|
mca_btl_mvapi_param_register_int("eager_rdma_num", "Number of RDMA buffers for eager messages",
|
||||||
@ -594,6 +594,10 @@ mca_btl_base_module_t** mca_btl_mvapi_component_init(int *num_btl_modules,
|
|||||||
return btls;
|
return btls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mca_btl_mvapi_handle_incoming_hp(mca_btl_mvapi_module_t *,
|
||||||
|
mca_btl_mvapi_endpoint_t *,
|
||||||
|
mca_btl_mvapi_frag_t *,
|
||||||
|
size_t);
|
||||||
int mca_btl_mvapi_handle_incoming_hp(
|
int mca_btl_mvapi_handle_incoming_hp(
|
||||||
mca_btl_mvapi_module_t *mvapi_btl,
|
mca_btl_mvapi_module_t *mvapi_btl,
|
||||||
mca_btl_mvapi_endpoint_t *endpoint,
|
mca_btl_mvapi_endpoint_t *endpoint,
|
||||||
@ -698,7 +702,7 @@ int mca_btl_mvapi_handle_incoming_hp(
|
|||||||
int mca_btl_mvapi_component_progress( void )
|
int mca_btl_mvapi_component_progress( void )
|
||||||
{
|
{
|
||||||
uint32_t i, j, c;
|
uint32_t i, j, c;
|
||||||
int count = 0, ret;
|
int count = 0, hret;
|
||||||
int32_t credits;
|
int32_t credits;
|
||||||
|
|
||||||
mca_btl_mvapi_frag_t* frag;
|
mca_btl_mvapi_frag_t* frag;
|
||||||
@ -741,11 +745,11 @@ int mca_btl_mvapi_component_progress( void )
|
|||||||
frag->segment.seg_addr.pval = ((unsigned char* )frag->hdr) +
|
frag->segment.seg_addr.pval = ((unsigned char* )frag->hdr) +
|
||||||
sizeof(mca_btl_mvapi_header_t);
|
sizeof(mca_btl_mvapi_header_t);
|
||||||
|
|
||||||
ret = mca_btl_mvapi_handle_incoming_hp(mvapi_btl,
|
hret = mca_btl_mvapi_handle_incoming_hp(mvapi_btl,
|
||||||
frag->endpoint, frag,
|
frag->endpoint, frag,
|
||||||
size - sizeof(mca_btl_mvapi_footer_t));
|
size - sizeof(mca_btl_mvapi_footer_t));
|
||||||
if (ret != MPI_SUCCESS)
|
if (hret != MPI_SUCCESS)
|
||||||
return ret;
|
return hret;
|
||||||
count++;
|
count++;
|
||||||
} else
|
} else
|
||||||
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
||||||
@ -825,10 +829,10 @@ int mca_btl_mvapi_component_progress( void )
|
|||||||
case VAPI_CQE_RQ_SEND_DATA:
|
case VAPI_CQE_RQ_SEND_DATA:
|
||||||
/* process a RECV */
|
/* process a RECV */
|
||||||
frag = (mca_btl_mvapi_frag_t*) (unsigned long) comp.id;
|
frag = (mca_btl_mvapi_frag_t*) (unsigned long) comp.id;
|
||||||
ret = mca_btl_mvapi_handle_incoming_hp(mvapi_btl,
|
hret = mca_btl_mvapi_handle_incoming_hp(mvapi_btl,
|
||||||
frag->endpoint, frag, comp.byte_len);
|
frag->endpoint, frag, comp.byte_len);
|
||||||
if (ret != OMPI_SUCCESS)
|
if (hret != OMPI_SUCCESS)
|
||||||
return ret;
|
return hret;
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -73,7 +73,8 @@ typedef struct mca_btl_mvapi_eager_rdma_remote_t mca_btl_mvapi_eager_rdma_remote
|
|||||||
}while (0)
|
}while (0)
|
||||||
|
|
||||||
#define MCA_BTL_MVAPI_GET_LOCAL_RDMA_FRAG(E, I) \
|
#define MCA_BTL_MVAPI_GET_LOCAL_RDMA_FRAG(E, I) \
|
||||||
(mca_btl_mvapi_frag_t*)((E)->eager_rdma_local.base.pval + \
|
(mca_btl_mvapi_frag_t*) \
|
||||||
|
((char*)(E)->eager_rdma_local.base.pval + \
|
||||||
(I) * (E)->endpoint_btl->eager_rdma_frag_size)
|
(I) * (E)->endpoint_btl->eager_rdma_frag_size)
|
||||||
|
|
||||||
#define MCA_BTL_MVAPI_RDMA_NEXT_INDEX(I) do { \
|
#define MCA_BTL_MVAPI_RDMA_NEXT_INDEX(I) do { \
|
||||||
|
@ -1164,7 +1164,6 @@ static int mca_btl_mvapi_endpoint_send_eager_rdma(
|
|||||||
mca_btl_mvapi_module_t* mvapi_btl = endpoint->endpoint_btl;
|
mca_btl_mvapi_module_t* mvapi_btl = endpoint->endpoint_btl;
|
||||||
mca_btl_mvapi_eager_rdma_header_t *rdma_hdr;
|
mca_btl_mvapi_eager_rdma_header_t *rdma_hdr;
|
||||||
mca_btl_mvapi_frag_t* frag;
|
mca_btl_mvapi_frag_t* frag;
|
||||||
struct ibv_send_wr* bad_wr;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
MCA_BTL_IB_FRAG_ALLOC_EAGER(mvapi_btl, frag, rc);
|
MCA_BTL_IB_FRAG_ALLOC_EAGER(mvapi_btl, frag, rc);
|
||||||
@ -1197,9 +1196,8 @@ void mca_btl_mvapi_endpoint_connect_eager_rdma(
|
|||||||
mca_btl_mvapi_endpoint_t* endpoint)
|
mca_btl_mvapi_endpoint_t* endpoint)
|
||||||
{
|
{
|
||||||
mca_btl_mvapi_module_t* mvapi_btl = endpoint->endpoint_btl;
|
mca_btl_mvapi_module_t* mvapi_btl = endpoint->endpoint_btl;
|
||||||
mca_btl_mvapi_eager_rdma_local_t *eager_rdma;
|
|
||||||
char *buf;
|
char *buf;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
||||||
if (endpoint->eager_rdma_local.base.pval)
|
if (endpoint->eager_rdma_local.base.pval)
|
||||||
@ -1243,7 +1241,7 @@ void mca_btl_mvapi_endpoint_connect_eager_rdma(
|
|||||||
cleanup:
|
cleanup:
|
||||||
OPAL_THREAD_UNLOCK(&mvapi_btl->eager_rdma_lock);
|
OPAL_THREAD_UNLOCK(&mvapi_btl->eager_rdma_lock);
|
||||||
mvapi_btl->super.btl_mpool->mpool_free(mvapi_btl->super.btl_mpool,
|
mvapi_btl->super.btl_mpool->mpool_free(mvapi_btl->super.btl_mpool,
|
||||||
buf, (mca_mpool_base_registration_t*)eager_rdma->reg);
|
buf, (mca_mpool_base_registration_t*)endpoint->eager_rdma_local.reg);
|
||||||
unlock_rdma_local:
|
unlock_rdma_local:
|
||||||
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
||||||
}
|
}
|
||||||
|
@ -187,11 +187,11 @@ int mca_btl_openib_component_open(void)
|
|||||||
mca_btl_openib_param_register_int("srq_sd_max", "Maximum number of send descriptors posted. (SRQ)",
|
mca_btl_openib_param_register_int("srq_sd_max", "Maximum number of send descriptors posted. (SRQ)",
|
||||||
8, &mca_btl_openib_component.srq_sd_max);
|
8, &mca_btl_openib_component.srq_sd_max);
|
||||||
mca_btl_openib_param_register_int("use_eager_rdma", "user RDMA for eager messages",
|
mca_btl_openib_param_register_int("use_eager_rdma", "user RDMA for eager messages",
|
||||||
0, &mca_btl_openib_component.use_eager_rdma);
|
0, (int*) &mca_btl_openib_component.use_eager_rdma);
|
||||||
if (mca_btl_openib_component.use_srq)
|
if (mca_btl_openib_component.use_srq)
|
||||||
mca_btl_openib_component.use_eager_rdma = 0;
|
mca_btl_openib_component.use_eager_rdma = 0;
|
||||||
mca_btl_openib_param_register_int("eager_rdma_threashold", "Open rdma channel for eager messages after this number of messages received from peer",
|
mca_btl_openib_param_register_int("eager_rdma_threashold", "Open rdma channel for eager messages after this number of messages received from peer",
|
||||||
100, &mca_btl_openib_component.eager_rdma_threashold);
|
100, (int*) &mca_btl_openib_component.eager_rdma_threashold);
|
||||||
mca_btl_openib_param_register_int("max_eager_rdma", "Maximum number of eager RDMA connections",
|
mca_btl_openib_param_register_int("max_eager_rdma", "Maximum number of eager RDMA connections",
|
||||||
16, (int*)&mca_btl_openib_component.max_eager_rdma);
|
16, (int*)&mca_btl_openib_component.max_eager_rdma);
|
||||||
mca_btl_openib_param_register_int("eager_rdma_num", "Number of RDMA buffers for eager messages",
|
mca_btl_openib_param_register_int("eager_rdma_num", "Number of RDMA buffers for eager messages",
|
||||||
@ -601,6 +601,10 @@ mca_btl_base_module_t** mca_btl_openib_component_init(int *num_btl_modules,
|
|||||||
return btls;
|
return btls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int mca_btl_openib_handle_incoming_hp(mca_btl_openib_module_t *,
|
||||||
|
mca_btl_openib_endpoint_t *,
|
||||||
|
mca_btl_openib_frag_t *,
|
||||||
|
size_t);
|
||||||
int mca_btl_openib_handle_incoming_hp(
|
int mca_btl_openib_handle_incoming_hp(
|
||||||
mca_btl_openib_module_t *openib_btl,
|
mca_btl_openib_module_t *openib_btl,
|
||||||
mca_btl_openib_endpoint_t *endpoint,
|
mca_btl_openib_endpoint_t *endpoint,
|
||||||
@ -799,7 +803,7 @@ int mca_btl_openib_component_progress()
|
|||||||
|
|
||||||
/* check to see if we need to progress any pending desciptors */
|
/* check to see if we need to progress any pending desciptors */
|
||||||
while (!opal_list_is_empty(&endpoint->pending_frags_hp) &&
|
while (!opal_list_is_empty(&endpoint->pending_frags_hp) &&
|
||||||
endpoint->sd_wqe_hp > 0 && (endpoint->sd_tokens_hp > 0 | endpoint->eager_rdma_remote.tokens > 0)) {
|
endpoint->sd_wqe_hp > 0 && (endpoint->sd_tokens_hp > 0 || endpoint->eager_rdma_remote.tokens > 0)) {
|
||||||
opal_list_item_t *frag_item;
|
opal_list_item_t *frag_item;
|
||||||
OPAL_THREAD_LOCK(&endpoint->endpoint_lock);
|
OPAL_THREAD_LOCK(&endpoint->endpoint_lock);
|
||||||
frag_item = opal_list_remove_first(&(endpoint->pending_frags_hp));
|
frag_item = opal_list_remove_first(&(endpoint->pending_frags_hp));
|
||||||
|
@ -74,7 +74,8 @@ typedef struct mca_btl_openib_eager_rdma_remote_t mca_btl_openib_eager_rdma_remo
|
|||||||
}while (0)
|
}while (0)
|
||||||
|
|
||||||
#define MCA_BTL_OPENIB_GET_LOCAL_RDMA_FRAG(E, I) \
|
#define MCA_BTL_OPENIB_GET_LOCAL_RDMA_FRAG(E, I) \
|
||||||
(mca_btl_openib_frag_t*)((E)->eager_rdma_local.base.pval + \
|
(mca_btl_openib_frag_t*) \
|
||||||
|
((char*)(E)->eager_rdma_local.base.pval + \
|
||||||
(I) * (E)->endpoint_btl->eager_rdma_frag_size)
|
(I) * (E)->endpoint_btl->eager_rdma_frag_size)
|
||||||
|
|
||||||
#define MCA_BTL_OPENIB_RDMA_NEXT_INDEX(I) do { \
|
#define MCA_BTL_OPENIB_RDMA_NEXT_INDEX(I) do { \
|
||||||
|
@ -1183,7 +1183,6 @@ static int mca_btl_openib_endpoint_send_eager_rdma(
|
|||||||
mca_btl_openib_module_t* openib_btl = endpoint->endpoint_btl;
|
mca_btl_openib_module_t* openib_btl = endpoint->endpoint_btl;
|
||||||
mca_btl_openib_eager_rdma_header_t *rdma_hdr;
|
mca_btl_openib_eager_rdma_header_t *rdma_hdr;
|
||||||
mca_btl_openib_frag_t* frag;
|
mca_btl_openib_frag_t* frag;
|
||||||
struct ibv_send_wr* bad_wr;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
MCA_BTL_IB_FRAG_ALLOC_EAGER(openib_btl, frag, rc);
|
MCA_BTL_IB_FRAG_ALLOC_EAGER(openib_btl, frag, rc);
|
||||||
@ -1216,9 +1215,8 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
|
|||||||
mca_btl_openib_endpoint_t* endpoint)
|
mca_btl_openib_endpoint_t* endpoint)
|
||||||
{
|
{
|
||||||
mca_btl_openib_module_t* openib_btl = endpoint->endpoint_btl;
|
mca_btl_openib_module_t* openib_btl = endpoint->endpoint_btl;
|
||||||
mca_btl_openib_eager_rdma_local_t *eager_rdma;
|
|
||||||
char *buf;
|
char *buf;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_LOCK(&endpoint->eager_rdma_local.lock);
|
||||||
if (endpoint->eager_rdma_local.base.pval)
|
if (endpoint->eager_rdma_local.base.pval)
|
||||||
@ -1262,7 +1260,7 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
|
|||||||
cleanup:
|
cleanup:
|
||||||
OPAL_THREAD_UNLOCK(&openib_btl->eager_rdma_lock);
|
OPAL_THREAD_UNLOCK(&openib_btl->eager_rdma_lock);
|
||||||
openib_btl->super.btl_mpool->mpool_free(openib_btl->super.btl_mpool,
|
openib_btl->super.btl_mpool->mpool_free(openib_btl->super.btl_mpool,
|
||||||
buf, (mca_mpool_base_registration_t*)eager_rdma->reg);
|
buf, (mca_mpool_base_registration_t*)endpoint->eager_rdma_local.reg);
|
||||||
unlock_rdma_local:
|
unlock_rdma_local:
|
||||||
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
OPAL_THREAD_UNLOCK(&endpoint->eager_rdma_local.lock);
|
||||||
}
|
}
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user