Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: fix frameworks usage of opal_output
From: George Bosilca (bosilca_at_[hidden])
Date: 2012-11-01 18:50:30

On Nov 1, 2012, at 16:18 , Nathan Hjelm <hjelmn_at_[hidden]> wrote:

> On Thu, Nov 01, 2012 at 04:07:32PM -0400, George Bosilca wrote:
>> Nathan,
>> Here is a quick question regarding the topi framework.
>> - The mca_topo_base_output is opened unconditionally in topo_base_open.c:62
>> - with your patch, mca_topo_base_output is closed conditionally in topo_base_close.c:46, but only in case mca_topo_base_components_opened_valid and mca_topo_base_components_available_valid are NULL. However, mca_topo_base_output is set to -1 in all cases right after.
>> Why is that so?
> mca_base_components_close closes the output if the third argument is NULL. So in this case calling opal_output_close after mca_base_components_close will result in a second call to opal_output_close.

Indeed, the behavior of the mca_base_components_close seems quite weird to me, as it lack of consistency.
- the symmetric function (mca_components_open) doesn't open the output stream
- the stream is close but the corresponding variable is not set to a meaningful value (-1)
- it force us to have one specific output for each framework.


>> In fact I think the mca_topo_base_close is entirely wrong. It should close all mca_topo_base_components_opened_valid component, then all mca_topo_base_components_available_valid components and then close the mca_topo_base_output and set it to -1.
> I looked into this as well. The select function for topo OBJ_DESTRUCTs mca_topo_base_components_opened and sets mca_topo_base_components_opened_valid to false. So if mca_topo_base_components_opened_valid is false it isn't safe to call mca_base_components_close. It is a little confusing and I don't know why the author if topo decided to do it that way.
> -Nathan Hjelm
> _______________________________________________
> devel mailing list
> devel_at_[hidden]