[MPI3 Fortran] MPI 3 text is ready

N.M. Maclaren nmm1 at cam.ac.uk
Thu Sep 23 04:04:01 CDT 2010


On Sep 22 2010, Rolf Rabenseifner wrote:
>
>Nick and Craig, are these asumptions fully correct?

The issue isn't whether the individual assumptions are correct, but whether
they fit together with the existing usage (Fortran and MPI).

For example, if choice buffers use that mechanism, then the following code
will fail (and is one of the most common ways of using MPI):

    SUBROUTINE Fred (array, size, root)
    INTEGER, INTENT(INOUT) :: array(*)
    INTEGER, INTENT(IN) :: size, root
    INTEGER :: error
    CALL Scatter(array,size,MPI_INTEGER,root,MPI_COMM_WORLD,error)
    END SUBROUTINE Fred

The failure is fundamental and unfixable in the current design of the
Interop TR - I proposed an alternative that would not fail, but it was
felt to be outside the TR's scope.  The fix is a source change:

    SUBROUTINE Fred (array, size, root)
    INTEGER, INTENT(INOUT) :: array(*)
    INTEGER, INTENT(IN) :: size, root
    INTEGER :: procs, rank, error
    CALL MPI_Comm_procs(rank,error)
    CALL MPI_Comm_rank(rank,error)
    IF (rank == root) THEN
        CALL Scatter(array(:procs*size),size,MPI_INTEGER,    &
            root,MPI_COMM_WORLD,error)
    ELSE
        CALL Scatter(array(:size),size,MPI_INTEGER,    &
            root,MPI_COMM_WORLD,error)
    END IF
    END SUBROUTINE Fred

I assert that that level of incompatibility is a major issue.

Regards,
Nick.




More information about the mpiwg-fortran mailing list