Re: [MPI3 Fortran] Argument data sizes
Craig Rasmussen wrote:
However, it is within our purview to discuss how to best represent this size in Fortran. I'm going to take a straw poll on this matter. Please choose one of the following choices:
1. A constant kind value defined by the implementation, e.g., MPI_SIZE_KIND, integer(MPI_SIZE_KIND) :: count It is expected that MPI_SIZE_KIND be the same kind as a default integer
This one is appealing, except I'd prefer that the "it is expected" bit specify C_intptr_t. ------------------------------------------- On Sep 18, 2008, at 5:10 PM, Jeff Squyres wrote:
What do Fortran app developers / usually do in this case? Do they ship multiple versions of their libraries? Or do they tend to only support either -i4 or >-i8 (but not both)?
I've seen both ways used. As noted earlier, if the user specifies -i8, the compiler can automatically find the right library if it is part of the programming environment package. (Actually, we only allow the case where both -r8 and -i8 are specified, not just one.) The library I'm personally involved with is more rigid. All of the dummy arguments have explicit kind values and there is a module that the user has to use (since the library procedures are module procedures). If the user supplies the wrong kind of argument, he gets an error.
Does it happen often/ever that there's multiple libraries that must be linked together in a single application, and not all of them are available at the same -iX >value?
The compiler can detect if a module was compiled with different -i8 / -r8 switches compared to the procedure using the module. This catches a lot of errors up front. If the program is linked with -i8 -r8, the load path is automatically adjusted to point to the 64-bit versions of vendor supplied libraries. Apart from that, the user is responsible for linking in the right library if there are multiple versions. In general, the use of switches like -i8 and -r8 is mainly a legacy issue. Newer codes tend to have a 'precision' module that defines symbolic names for the desired integer and real kinds, and all the declarations use these. They also use IMPLICIT NONE to avoid missing a variable declaration. Cheers, Bill -- Bill Long [email protected] Fortran Technical Support & voice: 651-605-9024 Bioinformatics Software Development fax: 651-605-9142 Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
participants (1)
-
Bill Long