[Mpi-forum] "BigCount" rendering in PDF

Joseph Schuchart schuchart at hlrs.de
Thu Aug 1 09:28:27 CDT 2019


I think the point he wanted to make was that you won't see a 
compile-time error if you /think/ you're using the MPI_Count overloads 
but are in fact not, i.e., you are modernizing a legacy code base that 
is stuck in the nineties and you introduce MPI_Count for size arguments 
because the standard says you may do so now without a clear warning that 
this is only possible if you bump to C11. The compiler won't warn you, 
the MPI standard may mention it in a subsection somewhere, which of 
course you didn't read because you haven't had the time to read all ~1k 
pages of 4.0, yet. Having a clear note attached to listings that these 
overloads are constrained to C11 may help reduce the risk of introducing 
another caveat. MPI developers may be (more) familiar with the 
differences between C99 and C11 but the average developer of HPC 
software likely is not. And there are plenty of codes out there that 
constrain themselves to ancient language versions, for reasons unknown 
to me...

Joseph

On 8/1/19 12:56 PM, Jeff Hammond via mpi-forum wrote:
> 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.
> 
> 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?
> 
> Jeff
> 
>> On Aug 1, 2019, at 3:23 AM, N.M. Maclaren via mpi-forum <mpi-forum at lists.mpi-forum.org> wrote:
>>
>>> On Jul 30 2019, Jeff Squyres (jsquyres) via mpi-forum wrote:
>>>
>>> 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).
>>
>> This following point may have already been debated, so please excuse me if
>> has.  Let's skip the politics, for the sake of all our blood pressures.
>>
>> The executive summary is that the failure mode pointed out by Joseph
>> Schuchart is going to be a very, very serious problem for BigCount users,
>> and continue for the forseeable future.  I would guess until at least
>> 2025, and possibly long after that.
>>
>> Speaking as someone who may be teaching MPI programming again, with an
>> emphasis on reliability and portability, I would almost certainly add
>> warnings that would be, roughly: "Don't touch BigCount if you can find a
>> way round it; and be paranoid about it if you use it."  I already do that
>> about I/O attributes, for similar reasons.  That isn't good.
>>
>> I don't know how you would document that, but the MPI standard already
>> has gotchas that aren't easy to find, and adding another one isn't good,
>> either.
>>
>> The explanation:
>>
>> C99 was not received favourably by most of the C-using community (I don't
>> mean compilers here).  I tracked a dozen important, active projects, and
>> it was 2010/11 (yes, over a decade) before even half of them converted
>> from C90 to C99 as a base.  I last checked a few years ago, but quite a
>> few C99 features were still not reliably available in compilers; I know
>> that many of the ones I found still aren't.  Courses are another problem,
>> because they rarely include warnings about gotchas caused by standards
>> differences (and there are lots between C90 and C99).
>>
>> I haven't tracked C11 as carefully, but the evidence I have seen is that it
>> received even less interest and acceptance than C99, so people are going
>> to be using C99 compilers for a LONG time yet.  There is also the problem
>> that C is not a language that is upwards compatible between versions, but
>> C++ takes more notice, so C++ compilers' C support (which is arguably more
>> important than direct C support, because people call MPI using C++'s C
>> interface) is often in conflict.  This is almost certainly a case where
>> that will be true, but it may not affect these interfaces - I can't say.
>>
>> The result is that C code (and, worse, libraries) often require specific
>> versions (i.e. not just 'any standard later than'). I agree that it looks
>> likely that generic interfaces are going to be one of the more widely
>> implemented parts of C99, but don't discount the problem of people using
>> multiple libraries where other ones constrain the C version for other
>> reasons.
>>
>> _______________________________________________
>> mpi-forum mailing list
>> mpi-forum at lists.mpi-forum.org
>> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
> 


More information about the mpi-forum mailing list