[MPIWG Fortran] Type of MPI_Status

Rolf Rabenseifner rabenseifner at hlrs.de
Thu Mar 13 00:51:59 CDT 2014


Jeff and Junchao,

it is a missing word INTEGER in this part of the sentence

In whole MPI these three values are in Fortran INTEGER and nothing else

Junchao, thank you for the hint that an erratum is neede
         to prevent from such misinterpretation

Jeff, please can you file the errata ticket resulting in

    ... containing three public INTEGER fields named ...

Best regards
Rolf


----- Original Message -----
> From: "Junchao Zhang" <jczhang at mcs.anl.gov>
> To: "MPI-WG Fortran working group" <mpiwg-fortran at lists.mpi-forum.org>
> Sent: Thursday, March 13, 2014 4:49:49 AM
> Subject: [MPIWG Fortran] Type of MPI_Status
> 
> 
> 
> 
> Hello,
> 
> 
> p30 of MPI3 says "In Fortran with USE mpi or INCLUDE ’mpif.h’, status
> is an array of INTEGERs of size MPI_STATUS_SIZE. ..., With Fortran
> USE mpi_f08, status is defined as the Fortran BIND(C) derived type
> TYPE(MPI_Status) containing three public fields named MPI_SOURCE ,
> MPI_TAG , and MPI_ERROR"
> 
> In other words, it does't say type of the three public fields must be
> INTEGER. So, in mpi_f08, can I declare MPI_Status as
> 
> 
> TYPE, BIND(C) :: MPI_Status
> INTEGER(C_INT) :: MPI_SOURCE, MPI_TAG, MPI_ERROR
> ... ! other fields
> END TYPE MPI_Status
> 
> 
> I find it makes MPI_Status binding easier. Since this type is
> interoperable with C, I do not need to allocate temp variables to do
> type conversion when INTEGER is not a C_INT.
> 
> 
> 
> --Junchao Zhang
> _______________________________________________
> 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)



More information about the mpiwg-fortran mailing list