WHAT: Add -DOPEN_MPI=1 to the mpif77 and mpif90 command lines
WHY: Parity with mpi.h's "#define OPEN_MPI 1"
TIMEOUT: Friday, Feb 19
We've long-since had "#define OPEN_MPI 1" in mpi.h for anyone who wanted to use it. There's a nonzero number of people who do.
Earlier this week, a user asked me for the equivalent in Fortran. That seems like a reasonable request to me. However, we can't put a #define in mpif.h because not all Fortran files are sent to the preprocessor by the compiler (e.g., foo.f will be compiled without preprocessor; foo.F will be sent to the preprocessor first and then compiled).
But we can put -DOPEN_MPI=1 in the argv that the wrapper adds. This seems like a safe way to add it; it makes no difference whether the Fortran file is set to the preprocessor or not when it is compiled.
I tested this concept with gfortran, ifort 11.1, and pgf77/pgf90 10.0 -- it seems to work for me in all cases. I'll ask Absoft to test their compiler as well. Can others try their favorite Fortran compilers? (e.g., Sun)
If no one has any objections, I'd like to add this for eventual inclusion in the v1.5 series (e.g., 1.5.1).
For corporate legal information go to: