[MPI3 Fortran] MPI-2 Fortran question: 2D char array inMPI_COMM_SPAWN_MULTIPLE

Jeff Squyres jsquyres at cisco.com
Tue May 25 09:36:21 CDT 2010


On May 25, 2010, at 10:26 AM, Jeff Squyres (jsquyres) wrote:

> That is, they strategically look for a string_len sized string *comprised of all blanks* to denote the end of the array.
> 
> This heuristic has apparently worked for years.  But it is apparently not true in at least recent versions of gfortran -- recent gfortran does not seem to guarantee that the (1st_dim * 2nd_dim + 1)th entry is all blanks to denote the end of the array.

BTW, I acknowledge that this heuristic is inherently broken.  I neglected to say in my first mail that it's perfectly valid for a Fortran character array entry to have an entry that is comprised of all blanks *that is not the end of the array*.

Fortunately, people don't tend to pass empty strings as command line argv, so it's been "good enough" for MPI.  But still not quite right.  :-\

-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/





More information about the mpiwg-fortran mailing list