-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C/Fortran predefined datatypes for C++ types #340
Comments
Originally by RolfRabenseifner on 2012-06-30 18:50:18 -0500 Corrections in
|
Originally by jedbrown on 2012-06-30 18:59:53 -0500 Why the uppercase C in |
Originally by RolfRabenseifner on 2012-07-01 02:38:06 -0500 Is your question about the family MPI_C_COMPLEX, MPI_C_FLOAT_COMPLEX, MPI_C_DOUBLE_COMPLEX, This is part of the existing MPI-2.2, see p516 lines 39-42. The C is introduced that it is distiguisched to MPI_COMPLEX which refers to Fortran COMPLEX, see p517 line 8. Side effect of your question: |
Originally by jedbrown on 2012-07-01 03:49:16 -0500 C99 defines the new keyword In MPI-2.2 Table 16.1 and page 517 lines 20-22, note that |
Originally by RolfRabenseifner on 2012-07-01 04:22:52 -0500 Jed's proposal:
Remark: The C++
Before changing this, I would like to know,
|
Originally by RolfRabenseifner on 2012-07-01 05:24:29 -0500 Nick M. Maclaren wrote in an email: On a related matter, there is no occurrence of "Complex" in C++11 except |
Originally by RolfRabenseifner on 2012-07-01 07:07:41 -0500 Impact on Implementations added. |
Originally by RolfRabenseifner on 2012-07-01 09:20:17 -0500 Open question: How is the extent and the alignment of MPI_CXX_BOOL, MPI_CXX_FLOAT_COMPLEX, MPI_CXX_DOUBLE_COMPLEX, and MPI_CXX_LONG_DOUBLE_COMPLEX defined, if there is no accompanying C++ compiler? These are the only 4 types in Table 16.1 on MPI-2.2 p472 that do not have a C type (MPI_PACKED and MPI_BYTE do not count). Proposals:
Are there other options? |
Originally by RolfRabenseifner on 2012-07-01 13:31:10 -0500 Nick M. Maclaren wrote by email:
They are essentially the only ones where the C++ compiler does not
I don't have time to study the standards in detail now, but I don't
That's by far the best solution. |
Originally by jsquyres on 2012-07-03 09:28:39 -0500 By "do not exist", do you mean that those handles exist, but they are set to MPI_DATATYPE_NULL (for example)? Or do you mean that mpi.h (etc.) do not define those symbol names at all? |
Originally by RolfRabenseifner on 2012-07-11 07:46:52 -0500
|
Originally by RolfRabenseifner on 2012-07-17 10:52:11 -0500 Update according to reading in the Forum, Monday July 16, 2012. |
Originally by RolfRabenseifner on 2012-07-17 11:39:23 -0500 Passed with single-only-vote |
Originally by htor on 2012-07-18 12:01:39 -0500 Committed to approved/coll - please review! --> http://www.unixer.de/sec/mpi-report.pdf Torsten |
Originally by tony on 2012-07-18 12:31:21 -0500 These appear OK under Global Reductions. However, inconsistency with Section 3.2.2 appears to need to talk about these types also, since they can be sent and received. |
Originally by jsquyres on 2012-07-18 13:58:03 -0500 The chapter 16 part of this ticket is moot because #281 removed all that C++ text from chapter 16. |
Originally by anhvo on 2012-07-18 18:35:10 -0500 typo detected in pt2pt due to the application of this ticket: Page 26, line 46: accomanying --> accompanying |
Originally by davesolt on 2012-07-18 18:41:19 -0500 I reviewed the mpi-report-cleandoc-r1441.pdf for this ticket. I missed the accomanying typo and did not see any other problems with the execution of this ticket. |
Originally by davesolt on 2012-07-18 18:46:26 -0500 accomanying --> accompanying fixed in svn |
Originally by RolfRabenseifner on 2013-01-07 11:30:39 -0600 Since Sep. 21, 2012, this ticket is included in MPI-3.0 and the pdf is checked according to https://svn.mpi-forum.org/svn/mpi-forum-docs/trunk/meetings/2012-07-jul/mpi3-tickets.xlsx Therefore, by proxy / on behalf of the ticket owner, I close it with priority "Ticket complete", resolution "Text committed". |
Originally by RolfRabenseifner on 2012-06-30 17:51:39 -0500
Description
-Part 1:*
MPI-2.2 page 517 lines 17-22 defines "C++-Only Named Predefined Datatypes" for the C++ types
bool
andcomplex<float>
,complex<double>
,complex<long double>
.MPI-2.2 language interoperability requires on page 503 line 8:
"All predefined datatypes can be used in datatype constructors in any language."
The MPI-2.2 is inconsistent, because it did not provide C and Fortran named predefined
datatypes for these C++ types.
This should be corrected with this MPI-2.2 errata.
It cannot be corrected through MPI-3.0 because it is expected that the C++ interface is removed in MPI-3.0 based on ticket #281 (Removal of C++).
-Part 2:*
MPI_C_COMPLEX was missing in the list of predefined datatypes for reduction operations.
-Part 3:*
The comments to this ticket showed that there is an additional problem with
the C++ types
Complex<float>
,Complex<double>
, andComplex<long double>
,and their MPI datatype handles defined in MPI-2.0 in 1997:
Complex<...>
does not exist. The standardized C++ type isstd::complex<...>
.History
Extended Scope
None.
Proposed Solution
This solution has three parts:
-MPI-2.2 Section 3.2.2, page 29 line 11 reads*
See Section 16.3.10 for information on interlanguage communication
with these types.
-but should read* (due to Part 1+3)
All predefined datatype handles are available in all language bindings.
See Section__s 16.3.6 and__ 16.3.10 on page 503 and 510 for information on interlanguage communication
with these types.
If there is an accomanying C++ compiler then the datatypes in Table 3.4 are also
supported in C and Fortran.
||=MPI datatype =||=C++ datatypes =||
||MPI_CXX_BOOL ||bool ||
||MPI_CXX_FLOAT_COMPLEX ||std::complex ||
||MPI_CXX_DOUBLE_COMPLEX ||std::complex ||
||MPI_CXX_LONG_DOUBLE_COMPLEX ||std::complex ||
Table 3.4: Predefined MPI datatypes corresponding to C++ datatypes
-MPI-2.2 Section 5.9.1, page 165, line 46 reads*
||Logical: ||MPI_LOGICAL, MPI_C_BOOL ||
-but should read* (due to Part 1)
||Logical: ||MPI_LOGICAL, MPI_C_BOOL__,__ ||
|| ||MPI_CXX_BOOL ||
-MPI-2.2 Section 5.9.1, page 165, lines 47 - page 166, line 7 read*
||Complex: ||MPI_COMPLEX, ||
|| ||MPI_C_FLOAT_COMPLEX, ||
|| ||MPI_C_DOUBLE_COMPLEX, ||
|| ||MPI_C_LONG_DOUBLE_COMPLEX, ||
|| ||and handles returned from ||
|| ||MPI_TYPE_CREATE_F90_COMPLEX, ||
|| ||and if available: MPI_DOUBLE_COMPLEX, ||
|| ||MPI_COMPLEX4, MPI_COMPLEX8, ||
|| ||MPI_COMPLEX16, MPI_COMPLEX32 ||
-but should read* (due to Part 1+2)
||Complex: ||MPI_COMPLEX, MPI_C_COMPLEX, ||
|| ||MPI_C_FLOAT_COMPLEX (as synonym), ||
|| ||MPI_C_DOUBLE_COMPLEX, ||
|| ||MPI_C_LONG_DOUBLE_COMPLEX, ||
|| ||MPI_CXX_FLOAT_COMPLEX, ||
|| ||MPI_CXX_DOUBLE_COMPLEX, ||
|| ||MPI_CXX_LONG_DOUBLE_COMPLEX, ||
|| ||and handles returned from ||
|| ||MPI_TYPE_CREATE_F90_COMPLEX, ||
|| ||and if available: MPI_DOUBLE_COMPLEX, ||
|| ||MPI_COMPLEX4, MPI_COMPLEX8, ||
|| ||MPI_COMPLEX16, MPI_COMPLEX32 ||
-MPI-2.2 Section 16.1.6, page 472 line 3,19-21 read*
||=MPI datatypes =||=C datatype =||=C++ types =||
||... ||... ||... ||
||MPI::COMPLEX || ||Complex ||
||MPI::DOUBLE_COMPLEX || ||Complex ||
||MPI::LONG_DOUBLE_COMPLEX || ||Complex ||
-but should read* (due to Part 3)
||=MPI datatypes =||=C datatype =||=C++ types =||
||... ||... ||... ||
||MPI::COMPLEX || ||std::c
Complex ||||MPI::DOUBLE_COMPLEX || ||std::c
Complex ||||MPI::LONG_DOUBLE_COMPLEX || ||std::c
Complex ||-MPI-2.2, Section 13.5.2, page 433, in the right column, the following lines should be added:* (due to Part 1)
||=C++ Types =||= Length=||
||MPI_CXX_BOOL || 1||
||MPI_CXX_FLOAT_COMPLEX || 2_4||
||MPI_CXX_DOUBLE_COMPLEX || 2_8||
||MPI_CXX_LONG_DOUBLE_COMPLEX || 2*16||
-MPI-2.2 Annex A.1.1, page 517 line 17-22 read*
||# C++-Only Named Predefined Datatypes||# C++ types||
||C++ type: MPI::Datatype || ||
||MPI::BOOL ||bool ||
||MPI::COMPLEX ||Complex ||
||MPI::DOUBLE_COMPLEX ||Complex ||
||MPI::LONG_DOUBLE_COMPLEX ||Complex ||
-but should read* (due to Part 1+3)
||||#
C++-OnlyNamed Predefined Datatypes__^1^||# C++ types^1^||||__C type: MPI_Datatype ||C++ type: MPI::Datatype || ||
||Fortran type: INTEGER || || ||
||MPI_CXX_BOOL ||MPI::BOOL ||bool ||
||MPI_CXX_FLOAT_COMPLEX ||MPI::COMPLEX ||std::c
Complex ||||MPI_CXX_DOUBLE_COMPLEX ||MPI::DOUBLE_COMPLEX ||std::c
Complex ||||MPI_CXX_LONG_DOUBLE_COMPLEX ||MPI::LONG_DOUBLE_COMPLEX ||std::c
Complex ||||||||^1^ If an accompanying C++ compiler is missing, then the MPI datatypes in this table are not defined. ||
-With #281 (Removal of C++), only the middle C++ predefined datatype column is removed, and not the whole table.*
Alternative Solutions
None.
Impact on Implementations
The C and Fortran representations
MPI_CXX_BOOL, MPI_CXX_FLOAT_COMPLEX, MPI_CXX_DOUBLE_COMPLEX, MPI_CXX_LONG_DOUBLE_COMPLEX
of the existing C++ datatype handles
MPI::BOOL, MPI::COMPLEX, MPI::DOUBLE_COMPLEX, MPI::LONG_DOUBLE_COMPLEX must be implemented. They must be added to the reduction datatypes and to the external32 datatypes.
The existing MPI_C_COMPLEX must be also added to the reduction datatypes.
As MPI-2.2 errata, it must be also implemented for MPI-2.2 libraries.
MPI::COMPLEX, MPI::DOUBLE_COMPLEX, MPI::LONG_DOUBLE_COMPLEX were related to the non-standard
C++ types Complex<...>. They now correspond to the standardized C++ types
std::complex<float>
,std::complex<double>
, andstd::complex<long double>
.Impact on Applications / Users
None.
Entry for the Change Log
Sections 3.2.2, 5.9.2, 13.5.2 Table 13.2, 16.1.16 Table 16.1, and Annex A.1.1
on pages 27, 164, 433, 472 and 513 and[[BR]]
MPI-2.2 Sections 3.2.2, 5.9.2, 13.5.2 Table 13.2, and Annex A.1.1 on pages 27, 164, 433, and 513.[[BR]]
MPI-2.2 errata: New named predefined datatypes MPI_CXX_BOOL, MPI_CXX_FLOAT_COMPLEX, MPI_CXX_DOUBLE_COMPLEX, and MPI_CXX_LONG_DOUBLE_COMPLEX in C and Fortran
for the C++ types
bool
,std::complex<float>
,std::complex<double>
,and
std::complex<long double>
, corresponding to the deprecated C++ predefined datatypesMPI::BOOL, MPI::COMPLEX, MPI::DOUBLE_COMPLEX, and MPI::LONG_DOUBLE_COMPLEX,[[BR]]
which are removed in MPI-3.0.[[BR]]
The non-standard C++ types
Complex<...>
are substituted by the standard typesstd::complex<...>
.-_The references "16.1.16 Table 16.1 on page 472" will be removed if ticket #281 passes.__[[BR]]
_The text "which are removed in MPI-3.0" will be removed if ticket #281 does not pass.*
Section 5.9.2 on page 164 and
MPI-2.2 Section 5.9.2, page 165, line 47.[[BR]]
MPI-2.2 errata: MPI_C_COMPLEX is added to the "Complex" reduction group.
The text was updated successfully, but these errors were encountered: