[MPIWG Fortran] Type of MPI_Status
Bill Long
longb at cray.com
Tue Mar 18 10:07:28 CDT 2014
On Mar 18, 2014, at 9:10 AM, Rolf Rabenseifner <rabenseifner at hlrs.de> wrote:
> Jeff,
>
> based on Bill's explanations
> I understand that all is the same:
>
> KIND(0) = KIND(1) = KIND(237834)
> = KIND(any default INTEGER number)
Right.
>
> = KIND(any default INTEGER variable) = KIND(ICVDhjk)
> = KIND(INTEger)
>
> provided that there is no "IMPLICIT NONE"and therefore,
> the with I beginning variables ICVDhjk and INTEger
> are automatically of type default INTEGER
Or if you explicitly declare the argument to be a default integer, which is safer in case you accidentally choose a variable also used by the surrounding code.
>
> Remark: You should never use KIND(INTEGER) because it may
Reasonable rule of thumb for various reasons. But this also excludes KIND(INTEger) since variable names in Fortran are case-insensitive.
Cheers,
Bill
> cause a name conflict if the MPI applications declares an
> own variable with name INTEGER.
>
> Best regards
> Rolf
>
> ----- Original Message -----
>> From: "Jeff Squyres (jsquyres)" <jsquyres at cisco.com>
>> To: "MPI-WG Fortran working group" <mpiwg-fortran at lists.mpi-forum.org>
>> Sent: Tuesday, March 18, 2014 2:23:24 PM
>> Subject: Re: [MPIWG Fortran] Type of MPI_Status
>>
>> On Mar 17, 2014, at 6:09 PM, Bill Long <longb at cray.com> wrote:
>>
>>>> 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
>>>>
>>>> KIND(1)
>>>>
>>>> (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 -- I'm now confused. Should I use KIND(0) or KIND(1)? Both have
>> been cited in this email thread.
>>
>> --
>> Jeff Squyres
>> jsquyres at cisco.com
>> For corporate legal information go to:
>> http://www.cisco.com/web/about/doing_business/legal/cri/
>>
>> _______________________________________________
>> mpiwg-fortran mailing list
>> mpiwg-fortran at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran
>>
>
> --
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
> Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307)
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran
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
mailing list