[mpich2-dev] Failures on Solaris and standard debug macros
Dave Goodell
goodell at mcs.anl.gov
Wed Dec 10 15:05:54 CST 2008
By the way, Bill, you were responsible for two out of the three
offending macros that Darius just fixed in r3676:
% for i in $(svn log -v -r 3676 | grep '^ *M ' | awk '{print $2}') ;
do ; svn blame $SVN_ROOT/$i at 3675 | egrep '#define .*(.*\.\.\.)' ; done
3174 gropp #define dprintf(...)
100 balaji #define printf_dd(x...) /*printf (x) */
3200 gropp #define dprintf(...)
I understand that these were from someone else's changes that you
merged from another branch, but ultimately merging to trunk is the
best time to scrutinize this sort of thing.
-Dave
On Dec 10, 2008, at 2:22 PM, Darius Buntinas wrote:
>
> I removed vararg macros from three places. The remaining ones are in
> hydra, where it looks like there's an #ifdef to check if they're
> supported, and the ib netmod which isn't used anyway.
>
> -d
>
> On 12/10/2008 08:28 AM, William Gropp wrote:
>> This morning's failures to compile on Solaris are due to the use of a
>> varargs macro definition, which is not universally supported. This
>> was
>> used for some debug printfs in the code, as a way to turn them on and
>> off easily. This approach, while quick, has several flaws:
>>
>> 1) Even in the debug/development version of the code, it requires
>> recompilation of the file
>> 2) It violates the coding standard that restricts the use of printf
>> (this is done to ensure that error messages can be correctly
>> internationalized - raw printfs with error messages are incorrect
>> in any
>> code that intends to support other languages)
>>
>> There is a solution - there are debugging macros that allow the
>> informational statements to be turned on and off by class at run
>> time,
>> and that can be eliminated entirely in production versions. These
>> are
>> used throughout the MPICH2 code and are preferable to the use of raw
>> printfs. The are a bit longer, but through the use of editor
>> macros or
>> simply saving the template in an editor register, are easy to insert.
>> See http://wiki.mcs.anl.gov/mpich2/index.php/Debug_Event_Logging for
>> instructions on using these macros.
More information about the mpich2-dev
mailing list