1
1

Removing port_touse - we don't really need it

This commit was SVN r16793.
Этот коммит содержится в:
Pavel Shamis 2007-11-28 09:57:48 +00:00
родитель 2ffbe8776a
Коммит aa79bdabc8
3 изменённых файлов: 12 добавлений и 11 удалений

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

@ -220,17 +220,24 @@ int mca_btl_openib_add_procs(
#if HAVE_XRC #if HAVE_XRC
if (MCA_BTL_XRC_ENABLED) { if (MCA_BTL_XRC_ENABLED) {
/* Pasha: now we need to push the subnet and lid to some global table in the component */ int rem_port_cnt = 0;
for(j = 0; j < (int) ib_proc->proc_port_count && rem_port_cnt < btl_rank; j++) {
if(ib_proc->proc_ports[j].subnet_id ==
openib_btl->port_info.subnet_id) {
rem_port_cnt ++;
}
}
assert(rem_port_cnt == btl_rank);
/* Push the subnet and lid to in the component */
rc = mca_btl_openib_ib_address_add_new( rc = mca_btl_openib_ib_address_add_new(
ib_proc->proc_ports[ib_proc->port_touse].subnet_id, ib_proc->proc_ports[j].subnet_id,
ib_proc->proc_ports[ib_proc->port_touse].lid, endpoint); ib_proc->proc_ports[j].lid, endpoint);
if (OMPI_SUCCESS != rc ) { if (OMPI_SUCCESS != rc ) {
OPAL_THREAD_UNLOCK(&ib_proc->proc_lock); OPAL_THREAD_UNLOCK(&ib_proc->proc_lock);
return OMPI_ERROR; return OMPI_ERROR;
} }
/* we caching REMOTE_LID to the endpoint */ /* we caching REMOTE_LID to the endpoint */
endpoint->lid = ib_proc->proc_ports[ib_proc->port_touse].lid; endpoint->lid = ib_proc->proc_ports[j].lid;
ib_proc->port_touse++;
} }
#endif #endif
mca_btl_openib_endpoint_init(openib_btl, endpoint); mca_btl_openib_endpoint_init(openib_btl, endpoint);

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

@ -121,8 +121,6 @@ mca_btl_openib_proc_t* mca_btl_openib_proc_create(ompi_proc_t* ompi_proc)
/* Initialize number of peer */ /* Initialize number of peer */
module_proc->proc_endpoint_count = 0; module_proc->proc_endpoint_count = 0;
module_proc->proc_ompi = ompi_proc; module_proc->proc_ompi = ompi_proc;
/* Initialize nex port to use, used only for xrc */
module_proc->port_touse = 0;
/* build a unique identifier (of arbitrary /* build a unique identifier (of arbitrary
* size) to represent the proc */ * size) to represent the proc */

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

@ -50,10 +50,6 @@ struct mca_btl_openib_proc_t {
size_t proc_port_count; size_t proc_port_count;
/**< number of ports published by endpoint */ /**< number of ports published by endpoint */
size_t port_touse;
/**< the index of port that will be used for new endpoint; used only for
* xrc qp */
struct mca_btl_base_endpoint_t **proc_endpoints; struct mca_btl_base_endpoint_t **proc_endpoints;
/**< array of endpoints that have been created to access this proc */ /**< array of endpoints that have been created to access this proc */