In fortran, I can declare a character string as:
character*80 mystring
and then send it as:
call MPI_Send(mystring,len(mystring),MPI_CHARACTER,...,ierr)
Alternatively, I could declare my string as an array of characters (much more in line with the way things are traditionally done in C)
character mystring(80)
and then send it as:
call MPI_Send(mystring,80,MPI_CHARACTER,...,ierr)
My understanding is that these two calls would have different interfaces when calling a C function. (the former is often implemented by the compiler by passing an additional parameter by value which holds the length of the string, whereas the latter does not pass that parameter). So, how does the MPI Implementation (typically written in C) know the difference?
http://www.mcs.anl.gov/research/projects/mpi/mpi-standard/mpi-report-1.1/node37.htm#Node38
Basically don’t do the latter.