[MPIWG Fortran] Type of MPI_Status
longb at cray.com
Mon Mar 17 17:09:38 CDT 2014
On Mar 17, 2014, at 5:00 PM, Craig Rasmussen <rasmus at cas.uoregon.edu> wrote:
> On Mar 17, 2014, at 2:52 PM, Jeff Squyres (jsquyres) wrote:
>> On Mar 17, 2014, at 5:13 PM, Bill Long <longb at cray.com> wrote:
>>> Try adding IMPLICIT NONE in the scope and see how well that works out for you. The argument to KIND is a variable or constant of intrinsic type. The result is the kind parameter value for that variable or constant. In your example, the result is the kind parameter value for the variable or named constant INTEGER. KIND does not take the name of a type as its argument. (And Fortran does not have reserved words, so INTEGER is a fine variable name.)
>> Craig owes Jeff a beer...
> Crap, again? I keep forgetting which language I'm programming in. I checked this with gfortran and it worked (as it should, but not in the way I thought it would). That is why I originally suggested to Jeff it be
> (because the literal 1 is an integer), but he asked what the heck does that mean so I came up with an example that I thought was more clear (but was actually worse).
More important, 1 is of type *default* integer, which is the requirement here.
> So this is Bill's suggestion (at least this is what I inferred from reading his email, if he recants on his suggestion, he should do so now :-)
> implicit none
> integer :: integer
> integer, parameter :: ompi_int_kind = KIND(integer)
That would work, but looks like an entry in an obfuscated coding contest. Not recommended (at least by me) for code maintenance.
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
Bill Long longb at cray.com
Fortran Technical Suport & 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