<div><div dir="auto">Are you saying that a C99 compiler won’t complaint if the user passes a 64b int to a 32b int argument? That’s a pretty stupid compiler if you ask me.</div></div><div dir="auto"><br></div><div dir="auto">I’m fine with putting MPI C11 in separate header that can #error if C11 isn’t supported. That’s a pretty obvious user experience win that costs nothing. We are basically doing that for Fortran already.</div><div dir="auto"><br></div><div dir="auto">Maclaren can just skip C11 and teach MPI in Fortran 2008 or C99 with the _x symbols if the C11 is too scary.</div><div dir="auto"><br></div><div dir="auto">In any case, we can’t design MPI around ignorant users who don’t read about features they’re using. Doing so makes it impossible to do anything at all because there’s always somebody too ignorant to use some feature correctly, and the union of the ignorance covers all nontrivial changes.</div><div dir="auto"><br></div><div dir="auto">Jeff</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 1, 2019 at 7:28 AM Joseph Schuchart via mpi-forum <<a href="mailto:mpi-forum@lists.mpi-forum.org">mpi-forum@lists.mpi-forum.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the point he wanted to make was that you won't see a <br>
compile-time error if you /think/ you're using the MPI_Count overloads <br>
but are in fact not, i.e., you are modernizing a legacy code base that <br>
is stuck in the nineties and you introduce MPI_Count for size arguments <br>
because the standard says you may do so now without a clear warning that <br>
this is only possible if you bump to C11. The compiler won't warn you, <br>
the MPI standard may mention it in a subsection somewhere, which of <br>
course you didn't read because you haven't had the time to read all ~1k <br>
pages of 4.0, yet. Having a clear note attached to listings that these <br>
overloads are constrained to C11 may help reduce the risk of introducing <br>
another caveat. MPI developers may be (more) familiar with the <br>
differences between C99 and C11 but the average developer of HPC <br>
software likely is not. And there are plenty of codes out there that <br>
constrain themselves to ancient language versions, for reasons unknown <br>
to me...<br>
<br>
Joseph<br>
<br>
On 8/1/19 12:56 PM, Jeff Hammond via mpi-forum wrote:<br>
> That’s why there will be C90/C99 compatible symbols as well. If you don’t like C11, don’t use it. Nothing will happen. BigCount will still work.<br>
> <br>
> C11 has been the default in GCC and Clang for a while. What compilers are going to limit users to C99 for years to come?<br>
> <br>
> Jeff<br>
> <br>
>> On Aug 1, 2019, at 3:23 AM, N.M. Maclaren via mpi-forum <<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a>> wrote:<br>
>><br>
>>> On Jul 30 2019, Jeff Squyres (jsquyres) via mpi-forum wrote:<br>
>>><br>
>>> B. C11 _Generic polymorphism kinda sucks, *and* we're in a transition period where not all C compilers are C11-capable. Hence, we're exposing up to *3* C bindings per MPI procedure to applications (including explicitly exposing the "_x" variant where relevant).<br>
>><br>
>> This following point may have already been debated, so please excuse me if<br>
>> has.  Let's skip the politics, for the sake of all our blood pressures.<br>
>><br>
>> The executive summary is that the failure mode pointed out by Joseph<br>
>> Schuchart is going to be a very, very serious problem for BigCount users,<br>
>> and continue for the forseeable future.  I would guess until at least<br>
>> 2025, and possibly long after that.<br>
>><br>
>> Speaking as someone who may be teaching MPI programming again, with an<br>
>> emphasis on reliability and portability, I would almost certainly add<br>
>> warnings that would be, roughly: "Don't touch BigCount if you can find a<br>
>> way round it; and be paranoid about it if you use it."  I already do that<br>
>> about I/O attributes, for similar reasons.  That isn't good.<br>
>><br>
>> I don't know how you would document that, but the MPI standard already<br>
>> has gotchas that aren't easy to find, and adding another one isn't good,<br>
>> either.<br>
>><br>
>> The explanation:<br>
>><br>
>> C99 was not received favourably by most of the C-using community (I don't<br>
>> mean compilers here).  I tracked a dozen important, active projects, and<br>
>> it was 2010/11 (yes, over a decade) before even half of them converted<br>
>> from C90 to C99 as a base.  I last checked a few years ago, but quite a<br>
>> few C99 features were still not reliably available in compilers; I know<br>
>> that many of the ones I found still aren't.  Courses are another problem,<br>
>> because they rarely include warnings about gotchas caused by standards<br>
>> differences (and there are lots between C90 and C99).<br>
>><br>
>> I haven't tracked C11 as carefully, but the evidence I have seen is that it<br>
>> received even less interest and acceptance than C99, so people are going<br>
>> to be using C99 compilers for a LONG time yet.  There is also the problem<br>
>> that C is not a language that is upwards compatible between versions, but<br>
>> C++ takes more notice, so C++ compilers' C support (which is arguably more<br>
>> important than direct C support, because people call MPI using C++'s C<br>
>> interface) is often in conflict.  This is almost certainly a case where<br>
>> that will be true, but it may not affect these interfaces - I can't say.<br>
>><br>
>> The result is that C code (and, worse, libraries) often require specific<br>
>> versions (i.e. not just 'any standard later than'). I agree that it looks<br>
>> likely that generic interfaces are going to be one of the more widely<br>
>> implemented parts of C99, but don't discount the problem of people using<br>
>> multiple libraries where other ones constrain the C version for other<br>
>> reasons.<br>
>><br>
>> _______________________________________________<br>
>> mpi-forum mailing list<br>
>> <a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a><br>
>> <a href="https://lists.mpi-forum.org/mailman/listinfo/mpi-forum" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpi-forum</a><br>
> _______________________________________________<br>
> mpi-forum mailing list<br>
> <a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a><br>
> <a href="https://lists.mpi-forum.org/mailman/listinfo/mpi-forum" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpi-forum</a><br>
> <br>
_______________________________________________<br>
mpi-forum mailing list<br>
<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a><br>
<a href="https://lists.mpi-forum.org/mailman/listinfo/mpi-forum" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpi-forum</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>