[MPI3 Fortran] Specify IN/OUT/INOUT in MPI spec?

N.M. Maclaren nmm1 at cam.ac.uk
Thu May 28 10:52:24 CDT 2009


On May 28 2009, Lionel, Steve wrote:

> Here's how I'd do it. I'm assuming that MPI_INT_KIND exists and I used 
> IMPORT from F2003 assuming that the types and kinds were defined 
> elsewhere in the same module. How this might be represented in the text 
> of the standard could vary.
>
>subroutine MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR)
>  import
>  <type>, dimension(*), intent(IN) ::BUF
>  integer(MPI_INT_KIND), intent(IN) :: COUNT
>  integer(MPI_INT_KIND), intent(IN) :: DATATYPE
>  integer(MPI_INT_KIND), intent(IN) :: DEST
>  integer(MPI_INT_KIND),  intent(IN) :: TAG
>  integer(MPI_INT_KIND),  intent(IN) :: COMM
>  integer(MPI_INT_KIND),  intent(OUT) :: IERROR
>  end subroutine MPI_SEND

Please, no!  If we are going to use KIND, let it be done properly.  There
needs to be a set of KINDs, because you have at least three different uses
of integers there.

I would tend to split them into counts (i.e. COUNT), handles (i.e. DATATYPE
and COMM) and smallish integers (i.e. DEST, TAG and IERROR).  But another
division might be better.

Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1 at cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679




More information about the mpiwg-fortran mailing list