How about making snprintf a requirement starting mpich2-1.3? The nightly tests already cover GNU, Intel, PGI, Sun, Absoft and (soon) Pathscale compilers. We can ask the Fujitsu guys whether it is supported for their compiler. We can also send out a note on mpich-discuss to make sure no one is using a compiler which doesn't support snprintf. -- Pavan On 11/24/2009 05:24 PM, Pavan Balaji wrote:
I just noticed that we have been using snprintf in mpd for a long time (since 2002, at least), and no one noticed any problem with it so far. That might give us some indication, at least about the snprintf part.
-- Pavan
On 10/24/2009 12:59 PM, Pavan Balaji wrote:
For as long as MPICH/MPICH2 has been developed, we have always tried to maintain the code as C89 compatible as possible. This is, in general, a good idea. However, this required us to add a lot of code to work with platforms and compilers that don't have C99 support. Given that C99 is almost a decade old now, and most compilers today support it, I'd like to initiate a discussion to see what people's thoughts are on requiring "C89++" support from the compiler for MPICH2.
By C89++, I mean C89 together with a few features from C99. My initial list contains just two features with some reasoning:
1. snprintf -- this will allow us to totally get rid of MPIU_Snprintf given that it is not complete anyway, but only provides a handful of options.
2. __VA_ARGS__ -- this will allow us to remove the requirement to add FUNCNAME for each function we add and a lot of code that checks if VA_ARGS is defined before doing anything with it.
If there are other C99 features that would be useful, please point them out as well. It goes without saying that the configure will of course still check if these exist. However, if they are not found, instead of trying to fall back to some other internal implementation, it'll abort.
If you are against this approach, it'll be helpful if you can point out systems/compilers where it might be a problem.
If you support this change, please do point that out as well.
Thanks,
-- Pavan
-- Pavan Balaji http://www.mcs.anl.gov/~balaji