Closed mpiforumbot closed 8 years ago
Originally by RolfRabenseifner on 2013-03-07 03:49:11 -0600
I added an additional sentence at the end of the advice on page 209 to make clear that Column "Upgrade to TS 29113" is enough to achive MPI_SUBARRAYS_SUPORTED == .TRUE. .
Originally by RolfRabenseifner on 2013-03-07 07:01:58 -0600
Some typo corrections.
Originally by RolfRabenseifner on 2013-03-25 08:19:40 -0500
In this proposal #364, we remove BIND(C) from
MPI_Iprobe(source, tag, comm, flag, status, ierror)
MPI_Request_get_status(request, flag, status, ierror)
MPI_Test(request, flag, status, ierror)
MPI_Testall(count, array_of_requests, flag, array_of_statuses, ierror)
MPI_Testany(count, array_of_requests, index, flag, status, ierror)
MPI_Test_cancelled(status, flag, ierror)
MPI_Op_commutative(op, commute, ierror)
MPI_Comm_get_attr(comm, comm_keyval, attribute_val, flag, ierror)
MPI_Comm_test_inter(comm, flag, ierror)
MPI_Intercomm_merge(intercomm, high, newintracomm, ierror)
MPI_Type_get_attr(datatype, type_keyval, attribute_val, flag, ierror)
MPI_Win_get_attr(win, win_keyval, attribute_val, flag, ierror)
MPI_Cart_create(comm_old, ndims, dims, periods, reorder, comm_cart, ierror)
MPI_Cart_get(comm, maxdims, dims, periods, coords, ierror)
MPI_Cart_map(comm, ndims, dims, periods, newrank, ierror)
MPI_Cart_sub(comm, remain_dims, newcomm, ierror)
MPI_Dist_graph_create(comm_old, n, sources, degrees, destinations, weights, info, reorder, comm_dist_graph, ierror)
MPI_Dist_graph_create_adjacent(comm_old, indegree, sources, sourceweights, outdegree, destinations, destweights, info, reorder, comm_dist_graph, ierror)
MPI_Dist_graph_neighbors_count(comm, indegree, outdegree, weighted, ierror)
MPI_Graph_create(comm_old, nnodes, index, edges, reorder, comm_graph, ierror)
MPI_Finalized(flag, ierror)
MPI_Initialized(flag, ierror)
MPI_Info_get(info, key, valuelen, value, flag, ierror)
MPI_Info_get_valuelen(info, key, valuelen, flag, ierror)
MPI_Win_test(win, flag, ierror)
MPI_Is_thread_main(flag, ierror)
MPI_Status_set_cancelled(status, flag, ierror)
MPI_File_get_atomicity(fh, flag, ierror)
MPI_File_set_atomicity(fh, flag, ierror)
MPI_Comm_create_keyval(comm_copy_attr_fn, comm_delete_attr_fn, comm_keyval, extra_state, ierror)
MPI_Type_create_keyval(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierror)
MPI_Win_create_keyval(win_copy_attr_fn, win_delete_attr_fn, win_keyval, extra_state, ierror)
MPI_Comm_create_errhandler(comm_errhandler_fn, errhandler, ierror)
MPI_File_create_errhandler(file_errhandler_fn, errhandler, ierror)
MPI_Win_create_errhandler(win_errhandler_fn, errhandler, ierror)
MPI_Grequest_start(query_fn, free_fn, cancel_fn, extra_state, request, ierror)
MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror)
MPI_Op_create(user_fn, commute, op, ierror)
MPI_COMM_DUP_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_COMM_NULL_COPY_FN(oldcomm, comm_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_COMM_NULL_DELETE_FN(comm, comm_keyval, attribute_val, extra_state, ierror)
MPI_TYPE_DUP_FN(oldtype, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_TYPE_NULL_COPY_FN(oldtype, type_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_TYPE_NULL_DELETE_FN(datatype, type_keyval, attribute_val, extra_state, ierror)
MPI_WIN_DUP_FN(oldwin, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_WIN_NULL_COPY_FN(oldwin, win_keyval, extra_state, attribute_val_in, attribute_val_out, flag, ierror)
MPI_WIN_NULL_DELETE_FN(win, win_keyval, attribute_val, extra_state, ierror)
MPI_CONVERSION_FN_NULL(userbuf, datatype, count, filebuf, position, extra_state, ierror)
i.e., from 48 out of 357 MPI routines.
Originally by RolfRabenseifner on 2013-03-25 08:37:34 -0500
I added a typo correction that is related to the routine groupes in the same section 17.1.5:
MPI_COMM_KEYVAL_CREATE --> MPI_COMM_CREATE_KEYVAL
Originally by RolfRabenseifner on 2013-03-28 13:35:09 -0500
Another problem are the character string arguments in 32 routines.
Here the list of the routines:
MPI_Add_error_string(errorcode, string, ierror)
MPI_Close_port(port_name, ierror)
MPI_Comm_accept(port_name, info, root, comm, newcomm, ierror)
MPI_Comm_connect(port_name, info, root, comm, newcomm, ierror)
MPI_Comm_set_name(comm, comm_name, ierror)
MPI_Comm_spawn(command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes, ierror)
MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes, ierror)
MPI_File_delete(filename, info, ierror)
MPI_File_open(comm, filename, amode, info, fh, ierror)
MPI_File_set_view(fh, disp, etype, filetype, datarep, info, ierror)
MPI_Info_delete(info, key, ierror)
MPI_Info_get_valuelen(info, key, valuelen, flag, ierror)
MPI_Info_set(info, key, value, ierror)
MPI_Pack_external(datarep, inbuf, incount, datatype, outbuf, outsize, position, ierror)
MPI_Pack_external_size(datarep, incount, datatype, size, ierror)
MPI_Publish_name(service_name, info, port_name, ierror)
MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror)
MPI_Type_set_name(datatype, type_name, ierror)
MPI_Unpack_external(datarep, inbuf, insize, position, outbuf, outcount, datatype, ierror)
MPI_Unpublish_name(service_name, info, port_name, ierror)
MPI_Win_set_name(win, win_name, ierror)
MPI_File_get_view(fh, disp, etype, filetype, datarep, ierror)
MPI_Info_get_nthkey(info, n, key, ierror)
MPI_Comm_get_name(comm, comm_name, resultlen, ierror)
MPI_Error_string(errorcode, string, resultlen, ierror)
MPI_Get_library_version(version, resultlen, ierror)
MPI_Get_processor_name(name, resultlen, ierror)
MPI_Open_port(info, port_name, ierror)
MPI_Type_get_name(datatype, type_name, resultlen, ierror)
MPI_Win_get_name(win, win_name, resultlen, ierror)
MPI_Lookup_name(service_name, info, port_name, ierror)
MPI_Info_get(info, key, valuelen, value, flag, ierror)
Special cases are:
MPI_Comm_spawn(command, argv, maxprocs, info, root, comm, intercomm, array_of_errcodes, ierror)
MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes, ierror)
MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, array_of_maxprocs, array_of_info, root, comm, intercomm, array_of_errcodes, ierror)
All these routines are currently in routine group MPI_COMM_RANK, except:
MPI_Info_get(info, key, valuelen, value, flag, ierror)
MPI_Info_get_valuelen(info, key, valuelen, flag, ierror)
MPI_Register_datarep(datarep, read_conversion_fn, write_conversion_fn, dtype_file_extent_fn, extra_state, ierror)
Originally by RolfRabenseifner on 2013-08-13 08:24:54 -0500
This ticket was withdrawn and substituted by the new solution in ticket #388.
Originally by RolfRabenseifner on 2013-03-03 09:16:37 -0600
This ticket is withdrawn. Solutions are in new tickets:
Description
MPI-3.0 has some inconsistencies in the new Fortran bindings, which must be corrected with MPI-3.0 errata.
The MPI-3.0 mpi_f08 module was based on the assumption that Fortran LOGICAL is interoperable with C. This is not the case in Fortran 2008 nor in the addendum TS 29113. With the proposed errata, it is no more required that LOGICAL is interoperable.
The inconsistencies, i.e., the reasons for the corrections, are also described within the 'solutions' section. See also the added advice to implementors.
Extended Scope
MPI-3.0 errata.
History
Proposed Solution (as MPI-3.0 errata)
(The underlining shows the changes: Removals are underlined in the cited existing text, new text is underlined in the proposed new text. [[BR]] The reasons should not be copied to the errata document on the web because they are only background information for the MPI Forum. [[BR]] The comments about an attached pdf are still placeholders.)
[[BR]]
'''MPI-3.0, Sect. 5.9.5 page 183 lines 46-47, Sect. 6.7.2 page 268 lines 21-23 and 31-33, Sect. 6.7.3 page 273 lines 45-47 and page 274 lines 7-9, Sect. 6.7.4 page 277 lines 10-12 and 19-21, Sect. 8.3.1 page 344 lines 21-22, Sect. 8.3.2 page 346 lines 11-12, Sect. 8.3.3 page 347 lines 36-37, Sect. 12.2 page 475 lines 9-10 and 42-43, and page 476 lines 36-37, Sect. 13.5.2 page 537 lines 27-29 and line 48 - page 538 line 2, Sect. A.1.3 page 678 lines 15-16, 24-26, 32-34, 41-43, page 679 lines 1-3, 10-12, 18-20, 27-28, 33-34, 40-41, 46 - page 680 line 2, page 680 lines 7-8, 11-13, 20-22, 26-28 read'''
ABSTRACT INTERFACE[[BR]] SUBROUTINE MPI_...(...............) BIND(C)
-but should read (without "BIND(C)")*
ABSTRACT INTERFACE[[BR]] SUBROUTINE MPI_...(...............)
(New text, see page ... lines ... in the attached pdf)
-Reason:* Some callback routines have LOGICAL dummy arguments. Such LOGICAL dummy arguments are not interoperable with C, i.e., the subroutine interface must not be BIND(C). All callback routines should be defined in the same way. Therefore the BIND(C) is removed from all callback ABSTRACT INTERFACE SUBROUTINE definitions.
[[BR]]
MPI-3.0, Sect. 17.1.5, page 607 line 27 reads
||MPI_ALLOC_MEM ..... ||MPI_ALLOC_MEM, MPI_WIN_ALLOCATE, || || ||... ||
-but should read (with a new routine group)*
||MPI_TEST .......... ||All MPI routines that have a LOGICAL || || ||dummy argument and that are not || ||callbacks and do not have callback || || ||dummy arguments. || ||MPI_ALLOC_MEM ..... ||MPI_ALLOC_MEM, MPI_WIN_ALLOCATE, || || ||... ||
(New text, see page ... lines ... in the attached pdf)
-Reason:* LOGICAL are not interoperable with C. Therefore, routines with LOGICAL dummy arguments should be in a separate routine group. With current Fortran 2008 + TS 29113, these routines cannot be implemented with BIND(C).
[[BR]]
MPI-3.0, Sect. 17.1.5, page 607 line 41 reads
||MPI_COMM_KEYVAL_CREATE ||All other routines with callback function arguments. ||
-but should read (typo correction)*
||MPI_COMM_CREATE_KEYVAL ||All other routines with callback function arguments. ||
(New text, see page ... lines ... in the attached pdf)
-Reason:* The name-giving MPI routine is MPI_Comm_create_keval.
[[BR]]
MPI-3.0, Sect. 17.1.5, page 608 lines 43-45 read
For the predefined callbacks, there is no choice, because the interfaces must fit to the callback function prototypes which are BIND(C) based for mpi_f08 and without BIND(C) for the mpi module and mpif.h.
-but should read (changed BIND(C) rule and additional advices)*
For predefined callbacks, i.e., the routines in the routine group MPI_COMM_DUP_FN, there is no choice, because the interfaces must fit to the callback function prototypes which are without BIND(C) for the mpi_f08 and mpi modules and mpif.h.
-Advice to implementors.* For the routines with LOGICAL dummy arguments, i.e., in the routine groups MPI_TEST and MPI_OP_CREATE, there is currently no choice, because LOGICAL is not interoperable with C in Fortran 2008 + TS 29113 or earlier. Therefore, these routines cannot be implemented with BIND(C) in Fortran 2008 + TS 29113 or earlier.
For the routines with PROCEDURE dummy arguments, i.e., in the routine groups MPI_OP_CREATE, MPI_REGISTER_DATEREP, and MPI_COMM_KEYVAL_CREATE, there is currently no choice, because PROCEDURE dummy arguments with a non-BIND(C) abstract interface are not interoperable with C in Fortran 2008 + TS 29113 or earlier. Therefore, these routines cannot be implemented with BIND(C) in Fortran 2008 + TS 29113 or earlier. -(End of advice to implementors.)*
(New text, see page ... lines ... in the attached pdf)
-Reason: * The BIND(C) was removed from the abstract interfaces for the callbacks. Reasons for that removal are provided above.
[[BR]]
MPI-3.0, Sect. 17.1.5, page 609 lines 21 reads
||MPI_ALLOCMEM... ............ ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||1/0/1/0 ||
-but should read (new routine group)*
||MPI_ALLOCMEM... ............ ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||1/0/1/0 || ||MPITEST... ................. ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||
(New text, see page ... lines ... in the attached pdf)
-Reason:* The new routine group MPI_TEST and the advice to implementors, see above.
[[BR]]
MPI-3.0, Sect. 17.1.5, page 609 lines 27-29 read
||MPI_OPCREATE... ............ ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||1/0/1/0 || ||MPI_REGISTERDATAREP... ..... ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||1/0/1/0 || ||MPI_COMM_KEYVALCREATE... ... ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||1/0/1/0 || ||MPI_COMM_DUPFN... .......... ||1/0/0/1 ||1/0/0/1 ||1/0/0/1 ||1/0/0/1 ||
-but should read (see underlined values and typo in one routine group name)*
||MPI_OPCREATE... ............ ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 || ||MPI_REGISTERDATAREP... ..... ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 || ||MPI_COMM_CREATEKEYVAL... ... ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 || ||MPI_COMM_DUPFN... .......... ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||0/1/0/1 ||
(New text, see page ... lines ... in the attached pdf)
-Reason:* The new routine group MPI_TEST and the advice to implementors, see above.
[BR]]
MPI-3.0, Sect. 17.1.5, page 609 line 31 reads
-(End of advice to implementors.)*
-but should read (see underlined values)*
The column "Upgrade to TS 29113" is an example for achieving MPI_SUBARRAYS_SUPPORTED equals .TRUE. in the mpi_f08 and mpi module with using BIND(C) only in the MPI_ISEND routine group.
[[BR]] -(End of advice to implementors.)*
(New text, see page ... lines ... in the attached pdf)
-Reason:* It was not clear to the implementers that it is enough to implement the MPI_ISEND routine group with BIND(C) to achieve the full quality. The added text is based on the existing text p607, lines 1-2. With the change in this ticket, some routine groups stop to be implementable with BIND(C). Therefore this clarifing sentence is helpful.
-Additional remark:* We may use a less strong wording on page 605 line 22 to page 606 line 6 to make clear that the relaxed implementations based on the advice to implementors on page 606 line 45 to page 607 line 3 are fully valid. This may be done in a new ticket that is doing only rewording to be more clear and consistent within MPI-3.0 Sect. 17.1.5. This ticket solves the problem of the inconsistency '''between MPI-3.0 and Fortran 2008 + TS 29113'''.
[[BR]]
'''MPI-3.0, Sect. A.3.4, page 724 lines 15-16, 24-25, and 34-35, page 728 lines 44-45, page 729 lines 7-8 and 16-17, page 730 lines 15-16, 23-24, and 32-33 read'''
MPI_..._FN(...) BIND(C)
-but should read (without "BIND(C)")*
MPI_..._FN(...)
(New text, see page ... lines ... in the attached pdf)
-Reason:* The BIND(C) was removed from the ABSTRACT INTERFACE SUBROUTINE definitions for these predefined callbacks.
-Latex source:* The Latex sources for these interfaces are hidden lines in Chapter 6 (Contexts).
-Additional remark:* These interfaces are also changed within ticket #345, which is already voted in. Both changes apply.
[[BR]]
MPI-3.0, Sect. A.2.11, page 700, line 46 reads
int MPI_File_close(MPI_File *fh)
-_but should read (add MPI_CONVERSION_FNNULL before)*
int MPI_CONVERSION_FN_NULL(void userbuf, MPI_Datatype datatype, int count, void filebuf, MPI_Offset position, void *extra_state)
int MPI_File_close(MPI_File *fh)
MPI-3.0, Sect. A.3.11, page 747, line 36 reads
MPI_File_close(fh, ierror) BIND(C)
-_but should read (add MPI_CONVERSION_FNNULL before, but without BIND(C))*
SUBROUTINE MPI_CONVERSION_FN_NULL(userbuf, datatype, [[BR]] count, filebuf, position, extra_state, ierror) [[BR]] USE, INTRINSIC
::
ISO_C_BINDING, ONLY : C_PTR[[BR]] TYPE(C_PTR), VALUE::
userbuf, filebuf[[BR]] TYPE(MPI_Datatype)::
datatype[[BR]] INTEGER::
count, ierror[[BR]] INTEGER(KIND=MPI_OFFSET_KIND)::
position[[BR]] INTEGER(KIND=MPI_ADDRESS_KIND)::
extra_stateMPI_File_close(fh, ierror) BIND(C)
MPI-3.0, Sect. A.4.11, page 780, line 22 reads
MPI_FILE_CLOSE(FH, IERROR)
-_but should read (add MPI_CONVERSION_FNNULL before)*
SUBROUTINE MPI_CONVERSION_FN_NULL(USERBUF, DATATYPE, [[BR]] COUNT, FILEBUF, POSITION, EXTRA_STATE, IERROR)[[BR]]
Because these changes are in within the MPI mpi_f08 interfaces, these errata must be applied before the new interfaces are implemented.
Impact on Applications / Users
When using the described MPI callback routine interfaces, the user should be aware of these errata, otherwise the compiler may return an error message.
Alternative Solutions
None.
Entry for the Change Log
To be done.
Voting category
This is a simple correction of an inconsistency.[[BR]] Therefore single reading+vote is recommended.
This ticket should be voted after it is checked in a first real MPI-3.0 Fortran mpi_f08 implementation.