<div dir="ltr">After reading mails in this thread, it seems we just want to get names of elements in a pvar, right?<div>So, why do not provide this functionality directly.<br><div><div style="font-family:arial,sans-serif;font-size:13px">
<font face="arial, helvetica, sans-serif"> // Return true or false in has_subnames. <br> MPI_T_pvar_has_subnames(session, handle, int has_subnames); </font></div><div style="font-family:arial,sans-serif;font-size:13px">
<font face="arial, helvetica, sans-serif"> // If has_subnames, use this function to get their names<br> MPI_T_pvar_get_subnames(session, handle, char * subnames[], int lens[]); // Very like the newly proposed MPI_T_pvar_read_str()<br>
</font></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">--Junchao Zhang</div></div>
<br><div class="gmail_quote">On Tue, Nov 12, 2013 at 4:09 PM, Schulz, Martin <span dir="ltr"><<a href="mailto:schulzm@llnl.gov" target="_blank">schulzm@llnl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
On Nov 12, 2013, at 12:51 PM, "Jeff Squyres (jsquyres)" <<a href="mailto:jsquyres@cisco.com" target="_blank">jsquyres@cisco.com</a>><br>
<div> wrote:<br>
<br>
> On Nov 11, 2013, at 7:03 PM, "Schulz, Martin" <<a href="mailto:schulzm@llnl.gov" target="_blank">schulzm@llnl.gov</a>> wrote:<br>
><br>
>>>> I think it would be better to programmatically express such relationships -- i.e., something new for MPI-4.<br>
>><br>
>> I agree with that, but I see it more as an MPI 3.1 feature. Is it really a major concept?<br>
><br>
> I thought it was "more" than a minor/bug fix concept... and therefore should wait until 4.<br>
<br>
</div>We need to finally discuss and decide that (as the forum) - this will definitely be on the agenda in December.<br>
<div><br>
>>> Er... I don't understand. Why can't the enum strings change? I think they can change at any time.<br>
>><br>
>> So that's a good question - I was assuming (at least that's how I always thought about it) that the same rules as for variables and all their metadata apply here - once read, a description cannot change and an enumeration type can worst thing grow. It is correct, though, that we didn't specify that explicitly - perhaps we need to do that. The only text that comes close is "The second datatype class, enumeration datatypes, describes variables with a fixed set of discrete values.".<br>
><br>
> Mmm. Yes. This *implies* that they don't change, but one could argue different meanings of "fixed set".<br>
<br>
</div>I know, this is ambiguous.<br>
<div><br>
><br>
>> Having strings change underneath would be a real problem for the string interface, since it makes the assumption that you can run queries against a string more than once and get the same string.<br>
><br>
> It sounds like you are introducing a new requirement, then: you want non-mutable strings, but the ability to have things change over time (e.g., new NICs added or old NICs dropped).<br>
<br>
</div>Well, I think we have two separate issues here:<br>
- Should strings be allowed to change? In particular, should we allow enumerations to change on the fly? I think the answer to this should be no, since this would create race conditions and it would prevent tools from caching any data (that's why we did it for the variable metadata and for the types it seems even more relevant)<br>
- Do we need a mechanism to describe changing variable arrays? This is more a requirement question - how is this in your case? Will you support changing number of NICs and how are you planning on doing that?<br>
<div><br>
><br>
>>> I think what you might be saying is that the *count* on a handle can't change -- right? I.e., MPI_T currently has no way of saying, "There were N values when you called pvar_handle_alloc() for this pvar, but now this pvar has M values."<br>
>><br>
>> Yes, but the count can change when you get a new handle.<br>
><br>
> That would be fairly hellish for an implementation: session/handle X has N values, but simultaneously, session/handle Y of the same pvar -- which just happened to be created after session/handle X -- has M values.<br>
><br>
> Meaning: the implementation has to track two entirely different views/counts of the same pvar.<br>
<br>
</div>Well, wouldn't that be up to the implementation? If it doesn't make sense for a particular case, then an MPI can always return the same count. I agree, if an MPI does do it that way, it won't be easy.<br>
<div><br>
><br>
>> Yes, that's what I meant with "doesn't have to be at the moment" - any variable that has the potential to have a count that is not 1 is affected.<br>
><br>
> ...which is *any* variable, right?<br>
<br>
</div>Yes - what I meant was that if there is a variable that a particular MPI implementation always decides to return 1 for, then you will probably never need a matching enumeration variable. However, just because it returns 1 once, it doesn't mean that it is guaranteed that it will stay that way for the rest of the run or during the next run. Hence, matching enumeration variables make sense even for variables that have a count of 1.<br>
<span><font color="#888888"><br>
Martin<br>
</font></span><div><br>
<br>
><br>
> --<br>
> Jeff Squyres<br>
> <a href="mailto:jsquyres@cisco.com" target="_blank">jsquyres@cisco.com</a><br>
> For corporate legal information go to: <a href="http://www.cisco.com/web/about/doing_business/legal/cri/" target="_blank">http://www.cisco.com/web/about/doing_business/legal/cri/</a><br>
><br>
<br>
</div><div>________________________________________________________________________<br>
Martin Schulz, <a href="mailto:schulzm@llnl.gov" target="_blank">schulzm@llnl.gov</a>, <a href="http://people.llnl.gov/schulzm" target="_blank">http://people.llnl.gov/schulzm</a><br>
CASC @ Lawrence Livermore National Laboratory, Livermore, USA<br>
<br>
<br>
<br>
</div><div><div>_______________________________________________<br>
mpiwg-tools mailing list<br>
<a href="mailto:mpiwg-tools@lists.mpi-forum.org" target="_blank">mpiwg-tools@lists.mpi-forum.org</a><br>
<a href="http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools" target="_blank">http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools</a><br>
</div></div></blockquote></div><br></div></div></div></div>