[mpiwg-tools] ticket 405: MPI_CHAR as string
Jeff Squyres (jsquyres)
jsquyres at cisco.com
Sat Feb 15 06:42:58 CST 2014
Sorry -- nit-picking on my own text:
-----
The use of the datatype MPI_CHAR in the MPI tool information interface implies a null-terminated character array, i.e., a string in the C language. If a variable has type MPI_CHAR, the value of the count parameter returned by MPI_T_CVAR_HANDLE_ALLOC and MPI_T_PVAR_HANDLE_ALLOC must be large enough to include any valid value, including its null-terminating character. The contents of returned MPI_CHAR arrays are only defined from index 0 through the location of the first null-terminating character.
-----
In the 2nd and 3rd sentence, we refer to the "null-terminating character". Is that correct? Isn't it just a "null character"?
We use "null-terminated character array" in the first sentence, and that seems fine. But "null-terminated character" means "a character terminated by a null", which doesn't seem to make sense.
In 14.3.3 ("Convention for Returning Strings"), we refer to the "null terminator" and "terminating null character").
I therefore think we should slightly change the last 2 sentences to:
-----
The use of the datatype MPI_CHAR in the MPI tool information interface implies a null-terminated character array, i.e., a string in the C language. If a variable has type MPI_CHAR, the value of the count parameter returned by MPI_T_CVAR_HANDLE_ALLOC and MPI_T_PVAR_HANDLE_ALLOC must be large enough to include any valid value, including its ***terminating null*** character. The contents of returned MPI_CHAR arrays are only defined from index 0 through the location of the first ***null*** character.
-----
On Feb 14, 2014, at 6:16 PM, "Mohror, Kathryn" <mohror1 at llnl.gov> wrote:
> Thanks for the feedback. I have attached a new draft for this ticket and incorporated your changes. Please give me any additional comments by the start of business Monday.
>
> Kathryn
>
> On Feb 14, 2014, at 7:23 AM, Dave Goodell (dgoodell) <dgoodell at cisco.com> wrote:
>
>> +1 to almost everything that Jeff said. My only quibble would be to change the last sentence in his text from:
>>
>> The contents of returned MPI_CHAR values are only defined from index 0 through the location of the first null-terminating character.
>>
>> To:
>>
>> The contents of returned MPI_CHAR ***arrays*** are only defined from index 0 through the location of the first null-terminating character.
>>
>> -Dave
>>
>> On Feb 14, 2014, at 7:27 AM, Jeff Squyres (jsquyres) <jsquyres at cisco.com> wrote:
>>
>>> Here's the new text:
>>>
>>> -----
>>> The use of the datatype MPI_CHAR in the MPI tool information interface implies a null-terminated character array, i.e. a string in the C language. If a variable has type MPI_CHAR, the value of the count parameter returned by MPI_T_CVAR_HANDLE_ALLOC and MPI_T_PVAR_HANDLE_ALLOC will include the null-terminating character. The value returned in count must be large enough to contain any valid value for the given variable. Arrays of type MPI_CHAR are only valid to the first null character.
>>> -----
>>>
>>> There's a missing "," after "i.e." -- it should be "i.e.,"
>>>
>>> I'd make some other minor changes:
>>>
>>> The use of the datatype MPI_CHAR in the MPI tool information interface implies a null-terminated character array, i.e., a string in the C language. If a variable has type MPI_CHAR, the value of the count parameter returned by MPI_T_CVAR_HANDLE_ALLOC and MPI_T_PVAR_HANDLE_ALLOC ***must be large enough to include any valid value, including its null-terminating character.*** ***The contents of returned MPI_CHAR values are only defined from index 0 through the location of the first null-terminating character.***
>>>
>>>
>>>
>>>
>>>
>>> On Feb 13, 2014, at 3:24 PM, Kathryn Mohror <kathryn at llnl.gov> wrote:
>>>
>>>> Hi all,
>>>>
>>>> Please have a look at this since we have to decide if it's ready for a reading, and submit it to the forum for review on Monday if we do.
>>>>
>>>> Kathryn
>>>>
>>>> On Feb 7, 2014, at 1:05 PM, "Mohror, Kathryn" <mohror1 at llnl.gov> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> As we discussed in our call, I have drafted new text for ticket 405 which clarifies our intent for the MPI_CHAR datatype to represent strings in the tools interface. Please take a look at the red text for ticket 405 in the attached document and send your comments.
>>>>>
>>>>> Kathryn
>>>>>
>>>>>
>>>>> _________________________________________________________________
>>>>> Kathryn Mohror, kathryn at llnl.gov, http://scalability.llnl.gov/
>>>>> Scalability Team @ Lawrence Livermore National Laboratory, Livermore, CA, USA
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <tools-3.pdf>_______________________________________________
>>>>> mpiwg-tools mailing list
>>>>> mpiwg-tools at lists.mpi-forum.org
>>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools
>>>>
>>>> _________________________________________________________________
>>>> Kathryn Mohror, kathryn at llnl.gov, http://scalability.llnl.gov/
>>>> Scalability Team @ Lawrence Livermore National Laboratory, Livermore, CA, USA
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> mpiwg-tools mailing list
>>>> mpiwg-tools at lists.mpi-forum.org
>>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools
>>>
>>>
>>> --
>>> Jeff Squyres
>>> jsquyres at cisco.com
>>> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>>>
>>> _______________________________________________
>>> mpiwg-tools mailing list
>>> mpiwg-tools at lists.mpi-forum.org
>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools
>>
>> _______________________________________________
>> mpiwg-tools mailing list
>> mpiwg-tools at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools
>
> _________________________________________________________________
> Kathryn Mohror, kathryn at llnl.gov, http://scalability.llnl.gov/
> Scalability Team @ Lawrence Livermore National Laboratory, Livermore, CA, USA
>
>
>
>
>
>
>
>
> <tools-3.pdf>_______________________________________________
> mpiwg-tools mailing list
> mpiwg-tools at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-tools
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpiwg-tools
mailing list