1
1

Don't always retain the proc, do it only for new procs. This enforce a strict policy in the BML, it has one and only one ref on each proc.

This commit was SVN r30429.
Этот коммит содержится в:
George Bosilca 2014-01-26 17:26:04 +00:00
родитель 18ae20022a
Коммит d265981c55

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

@ -158,12 +158,11 @@ static int mca_bml_r2_add_procs( size_t nprocs,
}
/* Select only the procs that don't yet have the BML proc struct. This prevent
* us from calling btl->add_procs several this on the same destination proc.
* us from calling btl->add_procs several times on the same destination proc.
*/
for(p_index = 0; p_index < nprocs; p_index++) {
struct ompi_proc_t* proc = procs[p_index];
OBJ_RETAIN(proc);
if(NULL != proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]) {
continue; /* go to the next proc */
}
@ -174,6 +173,7 @@ static int mca_bml_r2_add_procs( size_t nprocs,
return OMPI_ERR_OUT_OF_RESOURCE;
}
}
OBJ_RETAIN(proc);
new_procs[n_new_procs++] = proc;
}