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 - #F: Choice buffers through "TYPE(*), DIMENSION(..)" declarations #234

Closed mpiforumbot closed 8 years ago

mpiforumbot commented 8 years ago

Originally by RolfRabenseifner on 2010-09-01 10:45:31 -0500


234-F: Choice buffers through "TYPE(_), DIMENSION(..)" declarationsSee Ticket #229-A for an _overview* on the New MPI-3 Fortran Support.

Votes

Straw vote Oct. 11, 2010: 13 yes, 0 no, 2 abstain.[[BR]] Voting was under the assumption that "TYPE(*), DIMENSION(..)" will have Fortran standard quality.

Description

-Major decisions in this ticket:*

-Details:*

None.

History

The Fortran standardization body strongly works on this topic to provide a solution that explicit interfaces can be provided for all MPI routines including all choice arguments. A positive side effect is that the problems with strided arrays and nonblocking routines can also vanish. For this an implementation effort is necessary.

Proposed Solution

-MPI-2.2, Chapter 2, Terms and Conventions, Section 2.5.5 Choice, page 15, lines 38-42 read*

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran, the document uses to represent a choice variable; for C and C++, we use void *.

-but should read*

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran with the include file mpif.h or the mpi module, the document uses to represent a choice variable; *with the Fortran mpi_f08 module, such arguments are declared with the Fortran 2008 syntax `TYPE(), DIMENSION(..)`;* for C and C++, we use void .

**Advice to implementors. The implementor can freely choose how to implement choice arguments in the mpi module, e.g., with a non-standard compiler-dependent method that has the quality of the call mechanism in the implicit Fortran interfaces, or with the method defined for the mpi_f08 module. -(End of advice to implementors.)***

-MPI-2.2, Chapter 2, Terms and Conventions, Section 2.6 Language Binding, page 16, lines 21-22 read*

MPI bindings are for Fortran 90, though they are designed to be usable in Fortran 77 environments.

-but should read*

MPI bindings are for Fortran 90 and later, though they arewere originally designed to be usable in Fortran 77 environments. With the mpi_f08 module, the two Fortran 2008 features assumed type and assumed rank are also required, see Section 2.5.5. on page 15.

(Comment: MPI-2.2, Section 2.5.5. contains the new choice method TYPE(*), DIMENSION(..), see above.)

-MPI-2.2, Chapter 2, Terms and Conventions, Section 2.6.2 Fortran Binding Issues, page 17, lines 37-40 read*

Originally, MPI-1.1 provided bindings for Fortran 77. These bindings are retained, but they are now interpreted in the context of the Fortran 90 standard. MPI can still be used with most Fortran 77 compilers, as noted below. When the term Fortran is used it means Fortran 90.

-but should read*

Originally, MPI-1.1 provided bindings for Fortran 77. These bindings are retained, but they are now interpreted in the context of the Fortran 90 standard. MPI can still be used with most Fortran 77 compilers, as noted below. When the term Fortran is used it generally means Fortran 90__ and later; it means Fortran 2008 and later if the mpi_f08 module is used__.

Text related to this ticket but shown in Ticket #230-B:

-In Section 16.2.1 Overview:*

The INTEGER compile-time constant MPI_SUBARRAYS equals MPI_SUBARRAYS_SUPPORTED if all choice arguments are defined in explicit interfaces with standardized assumed type and assumed rank, otherwise it equals MPI_SUBARRAYS_UNSUPPORTED. This constant exists with each Fortran support method, but not in the C/C++ header files. The value may be different for each Fortran support method. (#234-F)****

-_In new Section 16.2.5 Fortran Support Through the mpif08 Module:*

Text related to this ticket but shown in Ticket #232-D:

-In Section 16.2.4 Fortran Support through the mpi Module:*

In this case, the compile-time constant MPI_SUBARRAYS equals MPI_SUBARRAYS_UNSUPPORTED \ (#234-F).**

'''See also Tickets #247-S and #249-U.

Impact on Implementations

This ticket has major impact on existing MPI implementations, because the handling of choice buffer arguments must be reimplemented. It is definitely different from the existing C (void *) interface. The buffer description is now a combination of the Fortran sub-array argument handling (i.e., non-contiguous sub-arrays) through an array descriptor and the MPI derived datatype handles. The MPI derived datatype handles apply to a virtual contiguous memory area that is built out of the portions defined in the Fortran array descriptor.

Impact on Applications / Users

Removal of all restrictions with the usage of Fortran array triplet-subscripts (e.g., a(1:100:3)) together with MPI nonblocking routines, but not with vector-subsripts (e.g., a([1,7,8,17,97])).

Alternative Solutions

None.

Entry for the Change Log

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

mpiforumbot commented 8 years ago

Originally by RolfRabenseifner on 2010-09-01 11:38:04 -0500


234-F: Choice buffers through "TYPE(_), DIMENSION(..)" declarationsSee Ticket #229-A for an _overview* on the New MPI-3 Fortran Support.

Description

-Major decisions in this ticket:*

-Details:*

Extended Scope

None.

History

The Fortran standardization body strongly works on this topic to provide a solution that explicit interfaces can be provided for all MPI routines including all choice arguments. A positive side effect is that the problems with strided arrays and nonblocking routines can also vanish. For this an implementation effort is necessary.

Proposed Solution

Chapter 2, Terms and Conventions, Section 2.5.5 Choice, page 15, lines 38-42 read

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran, the document uses to represent a choice variable; for C and C++, we use void *.

but should read

MPI functions sometimes use arguments with a choice (or union) data type. Distinct calls to the same routine may pass by reference actual arguments of different types. The mechanism for providing such arguments will differ from language to language. For Fortran with include file mpif.h or module mpi, the document uses to represent a choice variable; *with Fortran module mpi_f08, such arguments are declared with the Fortran 2008 method `TYPE(), DIMENSION(..)`;* for C and C++, we use void .

Advice to implementors. The implementor can freely choose how to implement choice arguments in the module mpi, e.g., with a non-standard method with the quality of the call mechanism in the implicit Fortran interfaces, or with the method defined for module mpi_f08. (End of advice to implementors.)

Chapter 2, Terms and Conventions, Section 2.6 Language Binding, page 16, lines 21-22 read

MPI bindings are for Fortran 90, though they are designed to be usable in Fortran 77 environments.

but should read

MPI bindings are for Fortran 90, though they are originally designed to be usable in Fortran 77 environments. With the module mpi_f08, the two Fortran 2008 features assumed type and assumed rank are also required, see Section 2.5.5. on page 15.

(Comment: Section 2.5.5. contains the new choice method TYPE(*), DIMENSION(..), see above.)

Chapter 2, Terms and Conventions, Section 2.6.2 Fortran Binding Issues, page 17, lines 37-40 read

Originally, MPI-1.1 provided bindings for Fortran 77. These bindings are retained, but they are now interpreted in the context of the Fortran 90 standard. MPI can still be used with most Fortran 77 compilers, as noted below. When the term Fortran is used it means Fortran 90.

but should read

Originally, MPI-1.1 provided bindings for Fortran 77. These bindings are retained, but they are now interpreted in the context of the Fortran 90 standard. MPI can still be used with most Fortran 77 compilers, as noted below. When the term Fortran is used it means Fortran 90__, and Fortran 2008 if the module mpi_f08 is used__.

Text related to this ticket but shown in Ticket #230-B:

-In Section 16.2.1 Overview:*

The LOGICAL compile-time constant MPI_CHOICE_IS_F08 is true if all choice arguments are defined in explicit interfaces with standardized assume type and assumed rank, otherwise false. This constant exists with each Fortran support method, but not in the C/C++ header files. The value may be different for each Fortran support method. (#234-F)****

-_In new Section 16.2.5 Fortran Support through Module mpif08:*

Text related to this ticket but shown in Ticket #232-D:

-In Section 16.2.4 Fortran Support through Module mpi*:

In this case, MPI_CHOICE_IS_F08 is false (#234-F).

'''See also Tickets #247-S and #249-U.

Impact on Implementations

This ticket has major impact on existing MPI implementations, because the handling of choice buffer arguments must be reimplemented. It is definitely different to the existing C (void *) interface. The buffer description is now a combination of the Fortran sub-array argument handling (i.e., non-contiguous sub-arrays) through an array descriptor and the MPI derived datatype handles. The MPI derived datatype handles apply to a virtual contiguous memory area that is built out of the portions defined in the Fortran array descriptor.

Impact on Applications / Users

Removal of all restrictions with the usage of Fortran array subscripts together with MPI nonblocking routines.

Alternative Solutions

None.

Entry for the Change Log

Section xxxx on page xxx.[[BR]] yyy.

mpiforumbot commented 8 years ago

Originally by RolfRabenseifner on 2010-09-01 11:41:39 -0500


The previous comment was not intented. It is identical to the current ticket content.

mpiforumbot commented 8 years ago

Originally by RolfRabenseifner on 2012-06-12 04:46:19 -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.