[MPI3 Fortran] Should we change string (character) API in MPI_Comm_spawn_multiple?
crasmussen at newmexicoconsortium.org
Wed May 26 11:27:58 CDT 2010
First the easy one, consider MPI_Comm_spawn. Currently argv is declared as
CHARACTER*(*) COMMAND, ARGV(*)
But I think we should change it to
CHARACTER*(*) COMMAND, ARGV(:)
so that users don't have to pad an extra string with blanks.
But with MPI_Comm_spawn_multiple it becomes a little more complicated
because argv becomes a two dimensional array. In reality the array is
ragged (each argv list can be of different lengths) so it seems we are back
to padding which I find ugly.
The alternative would be to create a derived type, say for the sake of
character(len=?) :: command ! ? mark means I don't know what should
go here for an allocatable
character(len=?) :: argv(:)
integer :: error
Then the user would create an array of argvs
TYPE(argv) :: args(count)
but would then have to allocate the components of the args separately.
Since I try to ignore all string manipulation in Fortran, I don't really
know of a good way to do this. Any body have a better ideas.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mpiwg-fortran