[mpich-discuss] using mpi.h with C++ and warnings that result (ultra-pedantic)

Jeff Hammond jhammond at alcf.anl.gov
Sat Mar 2 11:57:44 CST 2013


>> Is there a configure option that will cause MPICH to "typedef long
>> MPI_Count" instead?
>
> No, not without someone writing some new configure logic.  The ROMIO code that picks this value starts searching at the largest integer type it expects it might find ("long long") and goes down the list of types in decreasing integer rank until it finds one that works.  It doesn't look for the type with the smallest integer rank which still yields 8 bytes or anything like that, which is sort of what you are implying would be preferable behavior.
>
> If you actually had a compiler that would give an _error_ when "long long" was used in C++, then we could skip checking "long long" in that case.  So maybe "-Werror=long-long"?
>
> This really is a waste of everyone's time.  Just add "-Wno-long-long" and move on to a real problem.

Sure, but it still surprises me that MPI_Count requires a C99 type
when at least one member of the MPICH team is quite strict about the
need for MPICH to use only C89 features in order to work with the
Microsoft C compiler.

Jeff

-- 
Jeff Hammond
Argonne Leadership Computing Facility
University of Chicago Computation Institute
jhammond at alcf.anl.gov / (630) 252-5381
http://www.linkedin.com/in/jeffhammond
https://wiki.alcf.anl.gov/parts/index.php/User:Jhammond



More information about the discuss mailing list