[Mpi3-tools] MPIT 3.1: look up by name
Kathryn Mohror
kathryn at llnl.gov
Thu May 2 12:16:08 CDT 2013
Hi Bronis, all,
We discussed this on the WG call today. I put the notes from the discussion on the wiki page. The gist of the conversation was that yes, it is a convenience function, but it may be worth having. The reason is that a tool can't simply iterate over the variables once and be done with it. The number of variables can increase at runtime, so a tool may have to iterate more than once.
We settled on moving forward with a version of the routine that doesn't duplicate "get_info" but returns only the index and seeing how it plays out.
Kathryn
On May 2, 2013, at 6:19 AM, Bronis R. de Supinski <bronis at llnl.gov> wrote:
>
> I agree with Jeff that this request is a convenience function.
> Not only do I think he is right about it not needing to be
> performant and that an application could clearly do it
> itself but any more efficient implementation could be replicated
> at the application layer. For example, the tree-based approach
> could be done with one pass over the list that builds the tree.
>
> On Thu, 2 May 2013, Jeff Squyres (jsquyres) wrote:
>
>> On May 1, 2013, at 1:06 AM, "Schulz, Martin" <schulzm at llnl.gov> wrote:
>>
>>>> Is this just a convenience function?
>>>
>>> An implementation could store all variables in a tree (or some other more efficient structure) eliminating the need for a loop in favor of a lower complexity lookup algorithm. How severe this problem is, is a different question.
>>
>> I don't think that efficiency is the issue here -- even for an MPI implementation with thousands of cvars, a loop over them would take microseconds, at most. More specifically: I was not under the impression that cvar access needed to be performant.
>>
>> I guess my point is that: regardless of mechanism, this functionality can definitely be implemented in the user application with the current MPIT APIs. Moving this functionality to *inside* MPIT is a convenience.
>>
>> I'm not saying this is a good or bad idea -- I'm just making sure we all understand what is being asked. :-)
>>
>>> If we want to go for such a function, I wonder, though, if we should return all the arguments from GET_INFO or just the index (that you can then use get the rest of the information). This would could both keep the document (we are mentioning the GET_INFO functions a lot) and the implementations (only one pair of routines with such complex prototypes) simpler.
>>>
>>> Martin
>>>
>>>
>>>>
>>>>
>>>> On Apr 30, 2013, at 2:39 PM, Kathryn Mohror <kathryn at llnl.gov> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I've started to work on 3.1 items. The first one is to allow the look up of variables by name instead of having to iterate through all variables until you find the one you want (assuming you know the name in advance). What do people think of this for supporting that functionality:
>>>>>
>>>>> MPI_T_CVAR_GET_INFO_NAMED
>>>>> IN name
>>>>> OUT cvar_index
>>>>> OUT verbosity
>>>>> OUT datatype
>>>>> OUT enumtype
>>>>> OUT desc
>>>>> INOUT desc_len
>>>>> OUT bind
>>>>> OUT scope
>>>>>
>>>>> MPI_T_CVAR_GET_INFO_NAMED behaves similarly to MPI_T_CVAR_GET_INFO except that the lookup is done by control variable name instead of its index. All restrictions and requirements for MPI_T_CVAR_GET_INFO are the same for MPI_GET_CVAR_INFO_NAMED except that the cvar_index is now returned from the function, and name is an input.
>>>>>
>>>>>
>>>>> Then define MPI_T_PVAR_GET_INFO_NAMED in a similar fashion.
>>>>>
>>>>> Thoughts? Objections?
>>>>>
>>>>> Kathryn
>>>>>
>>>>>
>>>>> ______________________________________________________________
>>>>> Kathryn Mohror, kathryn at llnl.gov, http://people.llnl.gov/mohror1
>>>>> CASC @ Lawrence Livermore National Laboratory, Livermore, CA, USA
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mpi3-tools mailing list
>>>>> Mpi3-tools at lists.mpi-forum.org
>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools
>>>>
>>>>
>>>> --
>>>> Jeff Squyres
>>>> jsquyres at cisco.com
>>>> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>>>>
>>>>
>>>> _______________________________________________
>>>> Mpi3-tools mailing list
>>>> Mpi3-tools at lists.mpi-forum.org
>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools
>>>
>>> ________________________________________________________________________
>>> Martin Schulz, schulzm at llnl.gov, http://people.llnl.gov/schulzm
>>> CASC @ Lawrence Livermore National Laboratory, Livermore, USA
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Mpi3-tools mailing list
>>> Mpi3-tools at lists.mpi-forum.org
>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools
>>
>>
>> --
>> Jeff Squyres
>> jsquyres at cisco.com
>> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>>
>>
>> _______________________________________________
>> Mpi3-tools mailing list
>> Mpi3-tools at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools
>>
> _______________________________________________
> Mpi3-tools mailing list
> Mpi3-tools at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-tools
______________________________________________________________
Kathryn Mohror, kathryn at llnl.gov, http://people.llnl.gov/mohror1
CASC @ Lawrence Livermore National Laboratory, Livermore, CA, USA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-tools/attachments/20130502/57fcd1b2/attachment-0001.html>
More information about the mpiwg-tools
mailing list