[MPI3 Fortran] [Mpi-comments] MPI 3.0: Fortran 2008 interface - issue with the LOGICAL kind

Bill Long longb at cray.com
Tue Feb 26 18:20:36 CST 2013



On 2/26/13 6:05 PM, N.M. Maclaren wrote:
> On Feb 26 2013, Craig Rasmussen wrote:
>>
>> I don't know what Bill will think of this but I think the problem
>> should be resolved in the Fortran standard in the end so that
>>
>>      LOGICAL(C_INT)
>>
>> is a legal type. This would allow mapping Fortran logical variables to
>> C integers which is the type most C programmers use for logical
>> variables anyway.
>
> An interesting thought - a VERY interesting thought!  The name C_INT
> wouldn't do, because kinds are specific to a type, but that's a detail.
> I can't think of any reason that it wouldn't work.

If you want a name,  how about  MPI_LOGICAL_KIND?  We already have 
MPI_INTEGER_KIND for integers.  Since this is peculiar to the MPI 
environment, I'm not keen on adding something to Fortran.

Cheers,
Bill

>
>> Does anyone know what size a default logical is in existing compilers?
>> I assume it is the same size as a default integer.
>
> It had better be - that's required by the standard, and has been since
> Fortran II.
>
>
> Regards,
> Nick Maclaren.
>
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran

-- 
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