Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn] svn:open-mpi r27744 - trunk/ompi/runtime
From: George Bosilca (bosilca_at_[hidden])
Date: 2013-01-04 20:05:24


Ralph,

First and foremost let me remind you that you are referring here to an OMPI level API, a layer where your expertise is not at its greatest. The interface you propose to keep and promote is unsafe, as it returns a pointer to a non aligned object, this that will crash on almost all non-x86 environments. So, in addition to never being used in the current code base, this function was never tested, and had a promiscuous behavior that make it unsafe to use without special care. There are 3 reasons too many to remove it.

Your email was full with factual statements, with little to none foundation.

You want to resurrect the bproc code we stopped maintaining in 2007, dropped support in 1.2 and completely removed the code in the 1.5. Even google can give you the answer to that (https://svn.open-mpi.org/trac/ompi/ticket/2755).

Now about the bitmap, I have to guess you're referring to the orte_bitmap. Where is that code today? Nowhere, as it was an almost identical copy of another similar structure. The direct result of my action of removing the orte_bitmap was to that the two bitmap structures got blended together, and today we only have a single consistent implementation of the bitmap class used in all the layers. I'll bear the responsibility.

However, this discussion lived way over all its expectations. Let's focus on constructive topics.

  George.

On Jan 5, 2013, at 00:16 , Ralph Castain <rhc_at_[hidden]> wrote:

>
> On Jan 4, 2013, at 2:20 PM, George Bosilca <bosilca_at_[hidden]> wrote:
>
>> Having unused and untested function lingering out of the interface just for the sake of it is counter-productive. Less code is usually equivalent to cleaner code, potentially less bugs, to a faster reading and understanding of the code, to a faster immersion for newbies. The removed function was trivial, not even worth keeping as a reference. It can be re-written in few seconds is the need arise.
>
> So let me try to articulate this more clearly. You routinely complain about changes being made to the code base that impact your "hidden" code in your offline repos. Yet you feel free to remove a function from the code base - without warning - because you personally don't see it being used in the svn repo or in *your* private code bases.
>
> Does that summarize your point-of-view?
>
> My point is that we routinely "flesh out" APIs to provide broader functionality so it is available when needed. Many of our classes follow that example. Having an appropriate function that fills out a capability also follows that example. It may not be used by the code in the svn repo, or by you personally - but it might have proven useful to others.
>
> The fact that this function is trivial only makes its removal more laughable - it didn't remove a ton of code, didn't cleanup any code, and couldn't have contributed to bugs in other functions. So its removal was arbitrary - which is why I'm annoyed by it.
>
>
>>
>> Of course don't take my word on it: YAGNI (http://en.wikipedia.org/wiki/You_ain't_gonna_need_it).
>>
>> Moreover, I am interesting in your first statement. Can you enlighten us by pinpoint to an example where this was an issue?
>
> Sure - I'd like to see anyone go back and recover the bproc code. You may find pieces of it in the repo, assuming you know what frameworks to look for, and you may even be able to figure out a way to expose the code - but good luck trying to re-integrate it into the system.
>
> I've had to do it a couple of times - like when you whacked the opal_bitmap class because you weren't seeing it used. At least in that case, the time hadn't been too long and the code was contained enough so recovery wasn't too painful. Still, I had to dig thru svn to find the specific changeset that whacked it.
>
> So whacking something just because *you* don't see it being used isn't the best policy, IMO.
>
>
>>
>> George.
>>
>> On Jan 4, 2013, at 22:24 , Ralph Castain <rhc_at_[hidden]> wrote:
>>
>>> We've had zero luck using that approach in the past - finding a function that has been removed is hard, to say the least. The modex_recv area contains a balanced set of functions that includes both send/recv for each class of API. It was done that way to make it easy for developers to use whatever they needed - otherwise, people tend to write code directly into their local areas.
>>>
>>> I'd prefer to have some currently-unused function that completes the set. Or let's set a policy and go thru every class and framework defined in opal/orte/ompi and remove all APIs that aren't currently used - after all, we can restore those from svn someday too, can't we?
>>>
>>>
>>> On Jan 4, 2013, at 1:18 PM, George Bosilca <bosilca_at_[hidden]> wrote:
>>>
>>>> Ralph,
>>>>
>>>> This function now belong to our svn history, and will therefore be resurrected as soon as the need for it become essential. Until then, there is no real value of having such a function.
>>>>
>>>> George.
>>>>
>>>> On Jan 4, 2013, at 22:08 , Ralph Castain <rhc_at_[hidden]> wrote:
>>>>
>>>>> I guess it's actually the "recv_string_pointer" function that is used for this purpose, but I'd rather not just willy-nilly prune functions out of the code base because they aren't currently used. If we apply that criteria, a lot of functions that are there for future and/or historical reasons would be eliminated - and eventually likely restored.
>>>>>
>>>>> I don't see how this function hurt anyone - other than esthetics, is there a reason why this particular function must be removed?
>>>>>
>>>>>
>>>>> On Jan 4, 2013, at 1:01 PM, Ralph Castain <rhc_at_[hidden]> wrote:
>>>>>
>>>>>> Whoa - that function is used, I believe, to retrieve the pointer to the hostname info in the ompi_proc_t
>>>>>>
>>>>>>
>>>>>> On Jan 4, 2013, at 12:50 PM, svn-commit-mailer_at_[hidden] wrote:
>>>>>>
>>>>>>> Author: bosilca (George Bosilca)
>>>>>>> Date: 2013-01-04 15:50:25 EST (Fri, 04 Jan 2013)
>>>>>>> New Revision: 27744
>>>>>>> URL: https://svn.open-mpi.org/trac/ompi/changeset/27744
>>>>>>>
>>>>>>> Log:
>>>>>>> Remove the unnecessary ompi_modex_recv_pointer function.
>>>>>>>
>>>>>>> Text files modified:
>>>>>>> trunk/ompi/runtime/ompi_module_exchange.c | 22 ----------------------
>>>>>>> trunk/ompi/runtime/ompi_module_exchange.h | 5 -----
>>>>>>> 2 files changed, 0 insertions(+), 27 deletions(-)
>>>>>>>
>>>>>>> Modified: trunk/ompi/runtime/ompi_module_exchange.c
>>>>>>> ==============================================================================
>>>>>>> --- trunk/ompi/runtime/ompi_module_exchange.c Fri Jan 4 15:47:25 2013 (r27743)
>>>>>>> +++ trunk/ompi/runtime/ompi_module_exchange.c 2013-01-04 15:50:25 EST (Fri, 04 Jan 2013) (r27744)
>>>>>>> @@ -90,28 +90,6 @@
>>>>>>> return rc;
>>>>>>> }
>>>>>>>
>>>>>>> -/* return a pointer to the data, but don't create a new copy of it */
>>>>>>> -int ompi_modex_recv_pointer(const mca_base_component_t *component,
>>>>>>> - const ompi_proc_t *proc,
>>>>>>> - void **buffer, opal_data_type_t type)
>>>>>>> -{
>>>>>>> - int rc;
>>>>>>> - char *name = mca_base_component_to_string(component);
>>>>>>> -
>>>>>>> - /* set defaults */
>>>>>>> - *buffer = NULL;
>>>>>>> -
>>>>>>> - if (NULL == name) {
>>>>>>> - return OMPI_ERR_OUT_OF_RESOURCE;
>>>>>>> - }
>>>>>>> -
>>>>>>> - /* the fetch_poointer API returns a pointer to the data */
>>>>>>> - rc = orte_db.fetch_pointer(&proc->proc_name, name, buffer, type);
>>>>>>> - free(name);
>>>>>>> -
>>>>>>> - return rc;
>>>>>>> -}
>>>>>>> -
>>>>>>> int
>>>>>>> ompi_modex_send_string(const char* key,
>>>>>>> const void *buffer, size_t size)
>>>>>>>
>>>>>>> Modified: trunk/ompi/runtime/ompi_module_exchange.h
>>>>>>> ==============================================================================
>>>>>>> --- trunk/ompi/runtime/ompi_module_exchange.h Fri Jan 4 15:47:25 2013 (r27743)
>>>>>>> +++ trunk/ompi/runtime/ompi_module_exchange.h 2013-01-04 15:50:25 EST (Fri, 04 Jan 2013) (r27744)
>>>>>>> @@ -191,11 +191,6 @@
>>>>>>> const ompi_proc_t *source_proc,
>>>>>>> void **buffer, size_t *size);
>>>>>>>
>>>>>>> -
>>>>>>> -OMPI_DECLSPEC int ompi_modex_recv_pointer(const mca_base_component_t *component,
>>>>>>> - const ompi_proc_t *proc,
>>>>>>> - void **buffer, opal_data_type_t type);
>>>>>>> -
>>>>>>> /**
>>>>>>> * Receive a buffer from a given peer
>>>>>>> *
>>>>>>> _______________________________________________
>>>>>>> svn mailing list
>>>>>>> svn_at_[hidden]
>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/svn
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> devel mailing list
>>>>> devel_at_[hidden]
>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>>
>>>>
>>>> _______________________________________________
>>>> devel mailing list
>>>> devel_at_[hidden]
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>
>>>
>>> _______________________________________________
>>> devel mailing list
>>> devel_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>
>>
>> _______________________________________________
>> devel mailing list
>> devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel