Look like you miss the bitmap. Every time, one of the endpoint is
reacheable the corresponding bit in the bitmap is set to one. The
upper level reparse the bitmap and it will detect the number of
On May 24, 2006, at 6:12 AM, Andre Lichei wrote:
> currently I'm working at the r2 component of the bml framework. When I
> tried to get an deeper understanding of the component I experienced
> difficulties to figure out how the add_proc function should behave. So
> my question is how should the function behave, and what is the purpose
> of the bml_endpoint array? An explanation of my difficulties follows.
> The add_proc function is implemented in bml_r2.c and starts at line
> mca_bml_r2_add_procs(size_t nprocs,
>> struct ompi_proc_t** procs,
>> struct mca_bml_base_endpoint_t**
>> struct ompi_bitmap_t* reachable
> When I first read it, it seems that the function accepts an array of
> ompi_proc_t structs and return an array of the same size which
> one bml_endpoint for every process in the procs array.
> At the beginning of the function (line 193 to 204) is a loop checking
> if there are processes which are not new. If this is the case the
> existing bml_endpoint is selected and stored in the endpoint array.
> processes are stored in an different array. This means if all
> are known the function behaves like described above.
> When there are new processes the procs array is overwritten with the
> newly created array of new processes.(line 210) This array may be
> shorter. (When there was at least one known process) So the number of
> elements in nprocs is overwritten too. (line 211) But this nummber is
> no pointer so the calling function couldn't notice it.
> Now new bml_endpoints are created an stored in the bml_endpoints
> But they are stored at the position the process has in the new
> array!(line 271) So existing entries may be overwritten.
> The function receives an array with 4 processes (process 0 to 3).
> Process 2 is already known. So in the first loop the bml_endpoint of
> process 2 is stored at bml_endpoints. Also a new array is created
> containing process 0,1,3. This new array replaces the procs array.
> for all three processes bml_endpoints are created and stored at
> bml_endpoint[0,1,2]. So the existing entry (bml_endpoint) is
> So the bml_endpoint array contains only three elements, but the
> function has as number 4, because the new number can't be returned.
> So my question again. Is this the intended behavior or is it a bug?
> should the function behave?
> devel mailing list