[mpiwg-tools] Too strict for flags in MPI_T_pvar_get_info?

Nathan Hjelm hjelmn at mac.com
Thu Aug 14 11:49:01 CDT 2014


On Aug 14, 2014, at 10:35 AM, Junchao Zhang <jczhang at mcs.anl.gov> wrote:

> 
> It is a minor issue. In the Standard, the description for 
>    int MPI_T_pvar_get_info(..., int *readonly, int *continuous, int *atomic)
> says:
>   Upon return, the argument readonly is set to zero if the variable can be written or reset by the user. It is set to one if the variable can only be read. 
>   (Same thing happens to continuous and atomic.)
> 
> The description mandates an implementation must return 1 as TRUE, which does not follow C's convention. Other parts of MPI use true/false instead of 1/0 in description.  Section 2.6.3 make it clear that true means non-zero.

How does that not follow C’s convention? C mandates that the evaluation of a boolean operator (<, >, !, etc) MUST evaluate to either 0 or 1. Returning 0/1 here makes perfect sense.

Other parts of MPI probably use true/false because fortran logicals do not use 0/1 for false/true.

-Nathan Hjelm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-tools/attachments/20140814/f6769197/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-tools/attachments/20140814/f6769197/attachment-0001.pgp>


More information about the mpiwg-tools mailing list