1
1

Fix SM connectivity calculations.

This commit was SVN r14109.
Этот коммит содержится в:
Gleb Natapov 2007-03-21 13:29:19 +00:00
родитель 3e2031e0e3
Коммит c389c47d79

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

@ -177,6 +177,8 @@ int mca_btl_sm_add_procs(
if they're on my local host and in my job) */ if they're on my local host and in my job) */
if (procs[proc]->proc_name.jobid != my_proc->proc_name.jobid || if (procs[proc]->proc_name.jobid != my_proc->proc_name.jobid ||
0 == (procs[proc]->proc_flags & OMPI_PROC_FLAG_LOCAL)) { 0 == (procs[proc]->proc_flags & OMPI_PROC_FLAG_LOCAL)) {
peers[proc] = NULL;
mca_btl_sm_component.sm_proc_connect[proc] = 0;
continue; continue;
} }
@ -563,7 +565,8 @@ int mca_btl_sm_add_procs(
} }
/* set connectivity */ /* set connectivity */
cnt=0; cnt = 0;
i = mca_btl_sm_component.num_smp_procs;
for(proc = 0 ; proc < (int32_t)nprocs ; proc++ ) { for(proc = 0 ; proc < (int32_t)nprocs ; proc++ ) {
struct mca_btl_base_endpoint_t* peer = peers[proc]; struct mca_btl_base_endpoint_t* peer = peers[proc];
if(peer == NULL) if(peer == NULL)
@ -571,15 +574,14 @@ int mca_btl_sm_add_procs(
if( SM_CONNECTED == mca_btl_sm_component.sm_proc_connect[proc] ) { if( SM_CONNECTED == mca_btl_sm_component.sm_proc_connect[proc] ) {
/* don't count if same process */ /* don't count if same process */
if( (mca_btl_sm_component.num_smp_procs+proc ) == if( (mca_btl_sm_component.num_smp_procs+cnt ) ==
mca_btl_sm_component.my_smp_rank) { mca_btl_sm_component.my_smp_rank) {
cnt++;
continue; continue;
} }
mca_btl_sm_component.list_smp_procs mca_btl_sm_component.list_smp_procs[i++] = cnt++;
[mca_btl_sm_component.num_smp_procs + cnt] = proc; /* add this proc to shared memory accessibility list */
cnt++;
/* add this proc to shared memory accessability list */
return_code=ompi_bitmap_set_bit(reachability,proc); return_code=ompi_bitmap_set_bit(reachability,proc);
if( OMPI_SUCCESS != return_code ){ if( OMPI_SUCCESS != return_code ){
goto CLEANUP; goto CLEANUP;