1
1
This commit was SVN r9002.
Этот коммит содержится в:
George Bosilca 2006-02-12 21:36:07 +00:00
родитель 8b525ef21b
Коммит ecc3e00362
4 изменённых файлов: 22 добавлений и 21 удалений

Просмотреть файл

@ -784,7 +784,6 @@ ompi_convertor_prepare_for_send( ompi_convertor_t* convertor,
convertor->flags |= CONVERTOR_SEND;
convertor->memAlloc_fn = NULL;
convertor->memAlloc_userdata = NULL;
/* Just to avoid complaint from the compiler */
convertor->fAdvance = ompi_convertor_pack_general;
convertor->fAdvance = ompi_convertor_pack_homogeneous_with_memcpy;
@ -793,8 +792,9 @@ ompi_convertor_prepare_for_send( ompi_convertor_t* convertor,
if( datatype->flags & DT_FLAG_CONTIGUOUS ) {
assert( convertor->flags & DT_FLAG_CONTIGUOUS );
if( ((datatype->ub - datatype->lb) == (long)datatype->size)
|| (1 >= convertor->count) ) /* gaps or no gaps */
if( ((datatype->ub - datatype->lb) == (long)datatype->size) )
convertor->fAdvance = ompi_convertor_pack_no_conv_contig;
else if( 1 >= convertor->count ) /* gaps or no gaps */
convertor->fAdvance = ompi_convertor_pack_no_conv_contig;
else
convertor->fAdvance = ompi_convertor_pack_no_conv_contig_with_gaps;

Просмотреть файл

@ -68,70 +68,68 @@ static inline int mca_btl_mvapi_endpoint_post_send(
int ret;
if(frag->base.des_flags & MCA_BTL_DES_FLAGS_PRIORITY && frag->size <= mvapi_btl->super.btl_eager_limit){
/* check for a send wqe */
if (OPAL_THREAD_ADD32(&endpoint->sd_wqe_hp,-1) < 0) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_hp,1);
opal_list_append(&endpoint->pending_frags_hp, (opal_list_item_t *)frag);
return OMPI_SUCCESS;
/* check for a token */
} else if(!mca_btl_mvapi_component.use_srq &&
OPAL_THREAD_ADD32(&endpoint->sd_tokens_hp,-1) < 0) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_hp,1);
OPAL_THREAD_ADD32(&endpoint->sd_tokens_hp,1);
opal_list_append(&endpoint->pending_frags_hp, (opal_list_item_t *)frag);
return OMPI_SUCCESS;
} else if( mca_btl_mvapi_component.use_srq &&
OPAL_THREAD_ADD32(&mvapi_btl->sd_tokens_hp,-1) < 0) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_hp,1);
OPAL_THREAD_ADD32(&mvapi_btl->sd_tokens_hp,1);
OPAL_THREAD_LOCK(&mvapi_btl->ib_lock);
opal_list_append(&mvapi_btl->pending_frags_hp, (opal_list_item_t *)frag);
OPAL_THREAD_UNLOCK(&mvapi_btl->ib_lock);
return OMPI_SUCCESS;
/* queue the request */
} else {
frag->hdr->credits = (endpoint->rd_credits_hp > 0) ? endpoint->rd_credits_hp : 0;
OPAL_THREAD_ADD32(&endpoint->rd_credits_hp, -frag->hdr->credits);
qp_hndl = endpoint->lcl_qp_hndl_hp;
}
} else {
/* check for a send wqe */
if (OPAL_THREAD_ADD32(&endpoint->sd_wqe_lp,-1) < 0) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_lp,1);
opal_list_append(&endpoint->pending_frags_lp, (opal_list_item_t *)frag);
return OMPI_SUCCESS;
/* check for a token */
} else if(!mca_btl_mvapi_component.use_srq &&
OPAL_THREAD_ADD32(&endpoint->sd_tokens_lp,-1) < 0 ) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_lp,1);
OPAL_THREAD_ADD32(&endpoint->sd_tokens_lp,1);
opal_list_append(&endpoint->pending_frags_lp, (opal_list_item_t *)frag);
return OMPI_SUCCESS;
} else if(mca_btl_mvapi_component.use_srq &&
OPAL_THREAD_ADD32(&mvapi_btl->sd_tokens_lp,-1) < 0) {
OPAL_THREAD_ADD32(&endpoint->sd_wqe_lp,1);
OPAL_THREAD_ADD32(&mvapi_btl->sd_tokens_lp,1);
OPAL_THREAD_LOCK(&mvapi_btl->ib_lock);
opal_list_append(&mvapi_btl->pending_frags_lp, (opal_list_item_t *)frag);
OPAL_THREAD_UNLOCK(&mvapi_btl->ib_lock);
return OMPI_SUCCESS;
/* queue the request */
} else {
frag->hdr->credits = (endpoint->rd_credits_lp > 0) ? endpoint->rd_credits_lp : 0;

Просмотреть файл

@ -81,8 +81,7 @@ struct mca_pml_proc_t {
opal_mutex_t proc_lock; /**< lock to protect against concurrent access */
int proc_flags; /**< prefered method of accessing this peer */
};
typedef struct mca_pml_proc_t mca_pml_proc_t;
typedef struct mca_pml_proc_t mca_pml_proc_t;
typedef enum {
MCA_PML_BASE_SEND_STANDARD,

Просмотреть файл

@ -138,7 +138,11 @@ static inline int opal_condition_broadcast(opal_condition_t *c)
c->c_signaled += c->c_waiting;
#if OMPI_HAVE_POSIX_THREADS && OMPI_ENABLE_PROGRESS_THREADS
if(opal_using_threads()) {
pthread_cond_broadcast(&c->c_cond);
if( 1 == c->c_waiting ) {
pthread_cond_signal(&c->c_cond);
} else {
pthread_cond_broadcast(&c->c_cond);
}
}
#endif
return 0;