On 3/26/13 8:38 AM, Jeff Squyres (jsquyres) wrote:
On Mar 25, 2013, at 2:35 PM, Bill Long <[email protected]> wrote:
6. You can isolate the issues of Fortran types (compiled with -i8, meaning of LOGICAL, character arguments with len > 1) into the Fortran wrappers so that the C library writers do not have to know about these issues. Simplifies the maintenance and testing issues for the C library code.
There's a flaw in this logic.
Yes, you divorce the *bindings* between C and Fortran, but the MPI library still has to know whether INTEGER is 4 or 8 bytes (for example) so that it can send/receive them properly. I.e., the MPI datatypes are intrinsically tied to the language's native types, and are orthogonal to how the bindings are implemented.
I don't think there is a problem. To accommodate -i8 you have to recompile the MPI module with the -i8 flag set. We've been shipping two mpi modules as long as I can remember; the compiler scripts pick the right one based on how the user code is compiled. Same as how we select the right version of other libraries that also have Fortran default type arguments. Within the MPI module source the values of MPI_INTEGER and the similar data types for other Fortran default types are set based on detection of the actual sizes of the default types (which change with the compiler options). If you are using the module compiled with -i8, MPI_INTEGER will encode the information for an 8-byte integer. Cheers, Bill -- Bill Long [email protected] Fortran Technical Support & voice: 651-605-9024 Bioinformatics Software Development fax: 651-605-9142 Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101