From: HOLZHEU@XXXXXXXXXX X-Lotus-FromDomain: IBMDE To: William Gropp cc: BUENDGEN@XXXXXXXXXX Date: Mon, 3 May 1999 13:43:18 +0200 Subject: Re: C++ MPI constants Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline X-UIDL: c1eb5fe70cbf720ad421108fecd063b2 Bob, For your information: I have made some tests and realized that also my suggested solution (1) with lowercase constants will not work because of the MPI datatype constants like "MPI_FLOAT", MPI_DOUBLE" etc (It seems to be a nontrivial task to find the optimal solution...) Example: Constants: MPI::float, MPI::double: -------------------------------------------- class MPI { ... static const Datatype float; static const Datatype double; } Now we tried to make all constants mixed case with the first character uppercase and the rest lowercase. This seems to work and we did not realize any conflicts. But of course this will need a bit more investigation. Example: MPI::Float, MPI::Double, MPI::Long_long ------------------------------------------------ class MPI { ... static const Datatype Float; static const Datatype Double; static const Datatype Long_long; ... } Best Regards Michael ------------------------------------------------------------------------ OS/390 USS Parallel Environment Development Phone: +49-7031-16-2360, Fax -4240, Bld 71032-14-126 Email: holzheu@XXXXXXXXXX William Gropp on 04/29/99 11:05:54 PM Please respond to William Gropp To: Jeremy Siek cc: mpi-bind@XXXXXXXXXXX,mpi-core@XXXXXXXXXXX,mpi-io@XXXXXXXXXXX, Michael Holzheu/Germany/IBM,lumesdaine.1@XXXXXX, jsquyres@XXXXXXXXXX,jsiek@XXXXXXXXXX,treumann@XXXXXXXXXX, Reinhard Buendgen/Germany/IBM Subject: Re: C++ MPI constants At 09:28 AM 4/29/99 -0500, jeremy siek wrote: > >Michael Holzheu has brought to our attention a name conflict between >some macros in stdio.h (SEEK_SET, etc.) and the C++ MPI constants. > >He proposes two solutions. >1. Change all the C++ constants to lowercase, which would be more in > conformance with the style of the C++ standard libraries. > >2. Change just the offending constants by adding a "CPP_" prefix. > >Andrew Lumsdaine and I suggest that alternative #1 is the better choice. That's because #2 is so awful. Here's a more reasonable alternative 3. Change just the offending constants by adding an "MPI_" prefix. Of course, this makes the constants the same as the C versions, which doesn't seem so bad. That really makes the choices these: 1. Change to lowercase. 4. Remove them and use the respective C versions (MPI_SEEK_SET etc.) I'd prefer 4 slightly over 1. Bill