[MPIWG Fortran] Fwd: [Mpi-comments] MPI_Comm_spawn_multiple: parameter description and Fortran bindings
Jeff Hammond
jeff.science at gmail.com
Thu Feb 8 16:03:33 CST 2018
I'd rather deprecate MPI_Comm_spawn_multiple than try to wrap my head
around this one.
Jeff
On Thu, Feb 8, 2018 at 1:44 PM, Jeff Squyres (jsquyres) <jsquyres at cisco.com>
wrote:
>
> Forwarding this from the MPI-comments list to the Fortran working group...
>
>
> Begin forwarded message:
>
> From: Gilles Gouaillardet <gilles at rist.or.jp>
> Subject: [Mpi-comments] MPI_Comm_spawn_multiple: parameter description
and Fortran bindings
> Date: February 6, 2018 at 3:04:00 AM EST
> To: <mpi-comments at lists.mpi-forum.org>
> Reply-To: Comments on the MPI Standard <mpi-comments at lists.mpi-forum.org>
>
> Dear MPI Forum,
>
>
> The description of the 'array_of_commands` parameter passed to
'MPI_Comm_spawn_multiple()' is not crystal clear IMHO.
>
> The standard simply states
>
> MPI_COMM_SPAWN_MULTIPLE(count, array_of_commands, ...)
> IN count number of commands (positive integer, significant to MPI
> only at root | see advice to users)
> IN array_of_commands programs to be executed (array of strings,
> significant only at root)
>
> Advice to users. The argument count is interpreted by MPI only at
> the root, as is
> array_of_argv. Since the leading dimension of array_of_argv is
> count, a non-positive
> value of count at a non-root node could theoretically cause a
> runtime bounds check
> error, even though array_of_argv should be ignored by the
> subroutine. If this happens,
> you should explicitly supply a reasonable value of count on the
> non-root nodes. (End
> of advice to users.)
>
>
> And the Fortran binding is
>
> MPI_COMM_SPAWN_MULTIPLE(COUNT, ARRAY_OF_COMMANDS, ...)
> INTEGER COUNT
> CHARACTER*(*) ARRAY_OF_COMMANDS(*)
>
>
> Intuitively, it seems obvious that 'array_of_commands' is an array of
'count' commands.
>
> That being said, the standard does not state that, and it is unclear
whether 'array_of_commands' should be
>
> NULL-terminated (so to speak) or not.
>
>
> Back to the Fortran binding, the following prototype, which is somehow
consistent with 'array_of_argv',
>
> could (help to) clear the confusion. The same comments also apply to the
Fortran 2008 binding.
>
>
> CHARACTER*(*) ARRAY_OF_COMMANDS(COUNT)
>
>
>
> Gilles
> _______________________________________________
> mpi-comments mailing list
> mpi-comments at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-comments
>
>
>
> --
> Jeff Squyres
> jsquyres at cisco.com
>
>
>
>
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20180208/2240adba/attachment.html>
More information about the mpiwg-fortran
mailing list