mpi-forum / mpi-forum-historic

Migration of old MPI Forum Trac Tickets to GitHub. New issues belong on mpi-forum/mpi-issues.
http://www.mpi-forum.org
2 stars 3 forks source link

New MPI-3 Fortran Support - #S: All new Fortran 2008 bindings - Part 1 #247

Closed mpiforumbot closed 7 years ago

mpiforumbot commented 7 years ago

Originally by RolfRabenseifner on 2010-09-01 11:01:23 -0500


247-S: All new Fortran 2008 bindings - Part 1See Ticket #229-A for an overview on the New MPI-3 Fortran Support.

Description

-Major decisions in this ticket:*

-Details:*

This ticket provides the rule for converting existing Fortran interfaces into new Fortran 2008 interfaces.

Extended Scope

None.

History

Proposed Solution

-MPI-2.2, Section 5.9.5 User-Defined Reduction Operations, page 172, lines 9-12 read*

The Fortran declaration of the user-defined function appears below.

  SUBROUTINE USER_FUNCTION(INVEC, INOUTVEC, LEN, TYPE)
    <type> INVEC(LEN), INOUTVEC(LEN)
    INTEGER LEN, TYPE

-but should read*

When using mpif.h or the mpi module, the The Fortran declaration of the user-defined function is:

  SUBROUTINE USER_FUNCTION(INVEC, INOUTVEC, LEN, TYPE)
    <type> INVEC(LEN), INOUTVEC(LEN)
    INTEGER LEN, TYPE

__When using the mpi_f08 module, the declaration is:

  SUBROUTINE user_function(invec, inoutvec, len, type)
    TYPE(*) :: invec(len), inoutvec(len)
    INTEGER :: len
    TYPE(MPI_Datatype) :: type

__

-CAUTION:* If Ticket #234-F does not pass, then the new TYPE(*) line above must be substituted by [[BR]]<type> invec(len), inoutvec(len)

-CAUTION:* If Ticket #231-C does not pass, then the new INTEGER and the new TYPE(MPI_Datatype) line above must be substituted by [[BR]]INTEGER :: len, type

-MPI-2.2, Section 5.9.5 User-Defined Reduction Operations, page 173, lines 8-13 read*

The Fortran version of MPI_REDUCE will invoke a user-defined reduce function using the Fortran calling conventions and will pass a Fortran-type datatype argument; the C version will use C calling convention and the C representation of a datatype handle. Users who plan to mix languages should define their reduction functions accordingly. [[BR]](End of advice to users.)

-but should read*

The Fortran version of MPI_REDUCE will invoke a user-defined reduce function using the Fortran calling conventions and will pass a Fortran-type datatype argument; the C version will use C calling convention and the C representation of a datatype handle. If a Fortran user-defined reduce function is used, then the calling sequence further depends on whether MPI_OP_CREATE was invoked via the mpif.h or USE mpi interface, or the USE mpi_f08 interface. Users who plan to mix languages should define their reduction functions accordingly. [[BR]](End of advice to users.)

-MPI-2.2, Section 6.7 Caching*

-TODO*: Declaration of MPI_COMM_CREATE_KEYVAL, COMM_COPY_ATTR_FN, COMM_DELETE_ATTR_FN, MPI_WIN_CREATE_KEYVAL, WIN_COPY_ATTR_FN, WIN_DELETE_ATTR_FN, MPI_TYPE_CREATE_KEYVAL, TYPE_COPY_ATTR_FN, TYPE_DELETE_ATTR_FN

-MPI-2.2, Section 8.3 Error Handling*

-TODO*: Declaration of MPI_XXX_CREATE_ERRHANDLER with XXX = COMM, WIN, or FILE, and XXX_ERRHANDLER_FUNCTION

-MPI-2.2, Section 12.2 Generalized Requests*

-TODO*: Declaration of MPI_GREQUEST_START, GREQUEST_QUERY_FUNCTION, GREQUEST_FREE_FUNCTION, GREQUEST_CANCEL_FUNCTION,

-MPI-2.2, Appendix A.1.3 Prototype definitions, page 525-528*

-TODO*: Must be done also by hand

'''MPI-2.2, Appendix A.3, Fortran Bindings, page 547, line 1 reads (in AppLang-Fortran.tex)'''

A.3 Fortran Bindings

-but should read*

A.3 Fortran Bindings with mpif.h or the mpi Module

'''After MPI-2.2, Appendix A.3, Fortran Bindings, i.e., after page 570, add new Section (in new AppLang-Fortran2008.tex, which must be included by mpi-report.tex, and which includes AppLang-F2008Names.tex, which is produced by MAKE-APPLANG)'''

A.4 Fortran 2008 Bindings with the mpi_f08 Module

-It contains same as MPI-2.2, A.3, but*

The total list of all new Fortran bindings is shown in Ticket #248-T

Impact on Implementations

Impact on Applications / Users

Alternative Solutions

Entry for the Change Log

MPI-2.2, Section xxxx on page xxx.[[BR]] yyy.

mpiforumbot commented 7 years ago

Originally by RolfRabenseifner on 2012-06-12 05:03:52 -0500


Ticket is only a helper-ticket for passed #229, therefore this ticket is now marked as resolved. For further information, see status of ticket #229.