{"action":"opened","issue":{"url":"https://api.github.com/repos/mpiforumbot/mpi-forum-historic/issues/239","repository_url":"https://api.github.com/repos/mpiforumbot/mpi-forum-historic","labels_url":"https://api.github.com/repos/mpiforumbot/mpi-forum-historic/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/mpiforumbot/mpi-forum-historic/issues/239/comments","events_url":"https://api.github.com/repos/mpiforumbot/mpi-forum-historic/issues/239/events","html_url":"https://github.com/mpiforumbot/mpi-forum-historic/issues/239","id":167233466,"number":239,"title":"New MPI-3 Fortran Support - #K: IERROR optional","user":{"login":"mpiforumbot","id":20617676,"avatar_url":"https://avatars.githubusercontent.com/u/20617676?v=3","gravatar_id":"","url":"https://api.github.com/users/mpiforumbot","html_url":"https://github.com/mpiforumbot","followers_url":"https://api.github.com/users/mpiforumbot/followers","following_url":"https://api.github.com/users/mpiforumbot/following{/other_user}","gists_url":"https://api.github.com/users/mpiforumbot/gists{/gist_id}","starred_url":"https://api.github.com/users/mpiforumbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpiforumbot/subscriptions","organizations_url":"https://api.github.com/users/mpiforumbot/orgs","repos_url":"https://api.github.com/users/mpiforumbot/repos","events_url":"https://api.github.com/users/mpiforumbot/events{/privacy}","received_events_url":"https://api.github.com/users/mpiforumbot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-24T13:27:23Z","updated_at":"2016-07-24T13:27:23Z","closed_at":null,"body":"**Originally by _RolfRabenseifner_ on 2010-09-01 10:52:06 -0500**\n\n___\n# #239-K: IERROR optionalSee Ticket #229-A for an **overview** on the **New MPI-3 Fortran Support**.\n\n\n## Votes\n\nStraw vote Oct. 11, 2010: 14 yes,  0 no,  1 abstain.\n\n## Description\n\n-*Major decisions in this ticket:**\n\n - In the current MPI Fortran interface, the IERROR dummy argument is mandatory.\n In the MPI C interface, the MPI routines can be called as a function\n (i.e., the ierror value is returned) or as a procedure (i.e., ignoring\n the ierror value), and therefore the ierror is optional.\n With this ticket, the Fortran IERROR dummy argument is declared as optional\n in all MPI routines that provide an IERROR.\n\n-*Details:**\n\nFor user-defined callback functions (e.g., comm_copy_attr_fn) and their\npredefined callbacks (e.g., MPI_NULL_COPY_FN), ierror should not be optional,\ni.e., these user-defined functions should not need to check whether the MPI\nlibrary calls these routine with or without an actual ierror output argument.\n\n\n## Extended Scope\n\nNone.\n\n## History\n\nSince Fortran 90/95, the `OPTIONAL` attribute can be specified for dummy arguments.\n\n```\n  SUBROUTINE sss(a1, a2, a3)\n    INTEGER :: a1\n    INTEGER, OPTIONAL :: a2\n    INTEGER :: a3\n  END\n\n  ...\n  CALL sss(11, 22, 33)\n  CALL sss(11, a3=33)\n```\n\nIf only the last argument is optional, then the routine can be called\nwith and without this last argument, i.e., only by using\npositional arguments and without the need of using a keyword argument\n(as in `a3=33` in the second call).\n\n## Proposed Solution\n\n-*MPI-2.2, Section 2.6.2 Fortran Binding Issues, page 17, line 17 reads**\n\n  All MPI Fortran subroutines have a return code in the last argument.\n\n-*but should read** (#250-V: ..._FUNCTION instead of ..._FN)  \n\n  All MPI Fortran subroutines have a return code in the last argument.\n  __With `USE mpi_f08`, this last argument is declared as `OPTIONAL`,\n  except for user-defined callback functions (e.g., COMM_COPY_ATTR_FUNCTION) and their\n  predefined callbacks (e.g., MPI_NULL_COPY_FN).__\n\n\n__**Text related to this ticket but shown in Ticket #230-B:**__\n\n-*In new Section 16.2.5 Fortran Support through Module mpi_f08:**\n\n   - Declare all `ierror` output arguments as `optional`,\n   except for user-defined callback functions (e.g., COMM_COPY_ATTR_FUNCTION) and their\n   predefined callbacks (e.g., MPI_NULL_COPY_FN). **(#239-K)**\n\n    -Rationale.*\n    For user-defined callback functions (e.g., COMM_COPY_ATTR_FUNCTION) and their\n    predefined callbacks (e.g., MPI_NULL_COPY_FN), the ierror argument is not optional,\n    i.e., these user-defined functions should not need to check whether the MPI\n    library calls these routine with or without an actual ierror output argument.\n    -(End of rationale.) **(#239-K)** *\n\n\n## Impact on Implementations\n\nThe wrapper from Fortran to C must check whether an actual IERROR argument\nis provided by the calling Fortran application,\nand only in this case, the ierror output from the C MPI routine\ncan and must be returned into the actual IERROR argument.\n\n## Impact on Applications / Users\n\nFor existing applications, there is no impact.\nIn modified or newly written applications, the actual IERROR argument\ncan be omitted.\n\n## Alternative Solutions\n\n## Entry for the Change Log\n\nMPI-2.2, Section xxxx on page xxx.[[BR]]\nyyy.\n"}}
{"actor":{"display_login":"mpiforumbot"}}