[MPIWG Fortran] Type of MPI_Status
Jeff Squyres (jsquyres)
jsquyres at cisco.com
Mon Mar 17 15:57:20 CDT 2014
On Mar 17, 2014, at 4:03 PM, Bill Long <longb at cray.com> wrote:
>> Yes, but my KIND is the default INTEGER kind -- not the C_INT kind. Mine is solely for the purpose of making it BIND(C)-able:
>>
>> ! Get the KIND value that will be compatible with C, but also be a
>> ! default INTEGER. That way, all the BIND(C) types below will be
>> ! compatible with BIND(C) (because their member(s) will be BIND(C)
>> ! compatible).
>
> Better make sure there is a variable named INTEGER that is type default INTEGER for the statement below to work. The more common usage is just KIND(0).
There is not -- this is what Craig told me to do. :-)
He initially started with KIND(0), but then got all excited and told me to do KIND(INTEGER).
Is that incorrect?
>> integer, parameter :: OMPI_INT_KIND = kind(INTEGER)
>
> This does not appear to accomplish anything (other than irritate Rolf). If INTEGER(OMPI_INT_KIND) is interoperable, and suitable for a BIND(C) interface, then so is INTEGER. If you compile with -i8, OMPI_INT_KIND will switch from 4 to 8 (most implementations), but INTEGER would have the same effect.
For gfortran upcoming4.9, at least, having this kind seemed to make a difference... I'll have to test again to make sure that is correct.
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpiwg-fortran
mailing list