You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally by RolfRabenseifner on 2009-04-07 09:28:21 -0500
Description
Informations about handles:
13:1-3 "In Fortran, the handle can be an index into a table of opaque objects in a system table; in C it can be such an index or a pointer to the object"
13:18-20 "MPI provides certain predefined opaque objects and predefined, static handles to these objects. The user must not free such objects. In C++, this is enforced by declaring the handles to these predefined objects to be static const."
14:40-43 "All named constants, with the exceptions noted below for Fortran, can be used in initialization expressions or assignments. These constants do not change values during execution. Opaque objects accessed by constant handles are defined and do not change value between MPI initialization (MPI_INIT) and MPI completion (MPI_FINALIZE)."
It is not clear, whether the handles to predefined opaque objects are
Choice 1: compile time constants that can be used already at compile time for initializations,
Choice 2: link time constants, that can be used in initializations, but not in case/switch statements,
Choice 3: whether these handles may be integer variables or pointer variables that may change the value at MPI_Init.
For C++, the answer "static const" should imply the choice 1 or 2.
For Fortran, it is not clear for me, whether all three choice are valid.
The answer at MPI-3-Forum meeting, Dec. 2009 was:
Choice 2 (link-time constants) is intended with the current wording.
For some constants, the proposed usage in MPI-2.1 requires Choice 1
(compile-time constants), e.g.,
Solution 1 clarifies the current status.
[[BR]]
Solution 2 extends the number of compile-time constants.
In Case of choosing Solution 2, the the following tickets
are related: #5, #59, #76, #107.
History
This was split off from ticket #65.[[BR]]
Solution 1 (clarification) is done in ticket #65, and solution 2 (the enhancment) is done here.
Proposed Solution 2
-If the forum decides to pass this ticket #151, i.e., the enhancement-solution 2, then this solution supersedes the clarification-solution in ticket #65.*
At end of line p14:43, add:
The handles themselves are constants and can be also used in
initialization expressions or assignments.
All named constants, except the predefined named constant handles
and the constants listed below for Fortran, are compile-time
constants in all languages, and are also allowed as labels
in switch (C/C++) or select/case (Fortran) statements or
as sizes in array declarations.
Add after p15:15, add:
-Advice to users.*
Constants that are not compile-time constants, are at least
link-time constants. (End of advice to users.)
Impact on Implementations
MPI libraries
that are not using compile-time constants for MPI named constants
(except the constants listed MPI-2.1 p14:47 - p15.6),
and
that are not using at least link-time constants for MPI the
named constants listed MPI-2.1 p14:47 - p15.6 and
for predefined named constant handles
must be fixed.
Impact on Applications / Users
None on existing applications.
Implementations
Both, mpich2 and OpenMPI fulfill this stronger Proposed Solution 2:
mpich2 uses integer constants for MPI constants
and MPI predefined handles.
OpenMPI uses integer constants or enumerations for all
MPI constants (except predefined handles).
For named predefined handles, OpenMPI uses
in C, pointers to external structures
(i.e. link-time constants)
in Fortran, integer constants.
Exception in both mpich2 and OpenMPI:
The seven special constants from MPI-2.1 p14.47 - p15.5
are implemented
in C, they are constant pointers;
in Fortran, they are located in named Fortran common blocks.
Entry for the Change Log
Section 2.5.4 on page 14.[[BR]]
It is now guaranteed that predefined named constant handles (as other constants) can be used in initialization expressions or assignments, i.e., also before the call to MPI_INIT, and that all constants (except predefined handles and those listed in Section 2.5.4) are now compile-time constants.
Amendment Proposal
Substitute "compile-time constant(s)" by "integer constant(s)".
The text was updated successfully, but these errors were encountered:
Originally by RolfRabenseifner on 2009-04-07 09:28:21 -0500
Description
Informations about handles:
It is not clear, whether the handles to predefined opaque objects are
For C++, the answer "static const" should imply the choice 1 or 2.
For Fortran, it is not clear for me, whether all three choice are valid.
The answer at MPI-3-Forum meeting, Dec. 2009 was:
Choice 2 (link-time constants) is intended with the current wording.
For some constants, the proposed usage in MPI-2.1 requires Choice 1
(compile-time constants), e.g.,
MPI_MAX_DATAREP_STRING, MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL,
MPI_MAX_OBJECT_NAME, MPI_MAX_PORT_NAME,
MPI_OFFSET_KIND
Solution 1 clarifies the current status.
[[BR]]
Solution 2 extends the number of compile-time constants.
In Case of choosing Solution 2, the the following tickets
are related: #5, #59, #76, #107.
History
This was split off from ticket #65.[[BR]]
Solution 1 (clarification) is done in ticket #65, and solution 2 (the enhancment) is done here.
Proposed Solution 2
-If the forum decides to pass this ticket #151, i.e., the enhancement-solution 2, then this solution supersedes the clarification-solution in ticket #65.*
At end of line p14:43, add:
The handles themselves are constants and can be also used in
initialization expressions or assignments.
All named constants, except the predefined named constant handles
and the constants listed below for Fortran, are compile-time
constants in all languages, and are also allowed as labels
in switch (C/C++) or select/case (Fortran) statements or
as sizes in array declarations.
Add after p15:15, add:
-Advice to users.*
Constants that are not compile-time constants, are at least
link-time constants. (End of advice to users.)
Impact on Implementations
MPI libraries
(except the constants listed MPI-2.1 p14:47 - p15.6),
and
named constants listed MPI-2.1 p14:47 - p15.6 and
for predefined named constant handles
must be fixed.
Impact on Applications / Users
None on existing applications.
Implementations
Both, mpich2 and OpenMPI fulfill this stronger Proposed Solution 2:
and MPI predefined handles.
MPI constants (except predefined handles).
For named predefined handles, OpenMPI uses
(i.e. link-time constants)
The seven special constants from MPI-2.1 p14.47 - p15.5
are implemented
Entry for the Change Log
Section 2.5.4 on page 14.[[BR]]
It is now guaranteed that predefined named constant handles (as other constants) can be used in initialization expressions or assignments, i.e., also before the call to MPI_INIT, and that all constants (except predefined handles and those listed in Section 2.5.4) are now compile-time constants.
Amendment Proposal
Substitute "compile-time constant(s)" by "integer constant(s)".
The text was updated successfully, but these errors were encountered: