[MPI3 Fortran] Fwd: [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind
Bill Long
longb at cray.com
Mon Mar 4 13:37:23 CST 2013
On 3/2/13 3:10 AM, N.M. Maclaren wrote:
>
>> The even worse problem with default INTEGER is that some users will
>> compile their Fortran codes with options like -r8 -i8, leading to the
>> near certainty that in at least one case, KIND(0) will not be the same
>> as C_INT. You need two copies of the .mod file for the module - one
>> for 32-bit default integers, and the other for 64-bit default
>> integers. The source for the module can be the same, you just have to
>> compile the module twice, once each with and without the -r8 -i8
>> options. And make sure the compiler points to the right module file
>> depending on the -r8 -i8 settings in later compilations. Wrappers and
>> "path magic" solve this problem. But it is an artificial problem
>> introduced by the use of default INTEGER.
>
> Bill, we have been here several times before. That particular problem
> may be the one that affects you, but it affects very few users of MPI,
> and it is the least of small issues as far as the option compatibility
> goes. Other than the half-dozen USA mountain-top sites, most MPI users
> do not run with more than 2-4 GB per process, because cores and memory
> are increasing pro-rata.
It is very common to run with one MPI rank for the node, with OpenMP
within the node. This is especially common for codes that do not
naturally scale well. The node memory is often more that 4GB.
But there are other reasons for specifying -i8. Particularly, if you
want -r8 for some reason, you also need -i8 unless you want a
non-conforming compiler. Just as the size of default INTEGER and
LOGICAL are supposed to be the same, also default REAL and INTEGER are
equal size - part of the same rule.
Cheers,
Bill
--
Bill Long longb at cray.com
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
More information about the mpiwg-fortran
mailing list