[MPI3 Fortran] Results of recent J3 Fortran meeting

Bill Long longb at cray.com
Thu Oct 21 15:56:57 CDT 2010

N.M. Maclaren wrote:
> On Oct 21 2010, Bill Long wrote:
>> Not sure where compiler options come in here, but...
>> As noted earlier, this is currently an academic issue since the only 
>> interoperable character is char. ...
> You have completely missed the point.  I am not assuming any type other
> than Fortran default CHARACTER.  There are compilers where you have a
> options like -ASCII and -UNICODE, which control which character code
> Fortran uses for its default characters.  I can't offhand remember which,
> as I wasn't very interested, but I have seen more than one.
> So a new type code in the Interoperability specification doesn't help,
> because the interface type is default CHARACTER in both cases.

We currently interoperate only with C's char type. On the Fortran side, 
the interoperable declaration is character(kind=c_char).  Fortran's 
default character kind is irrelevant.  And sizeof(char) is 1. So there 
is no issue here.


> If I can't tell how big a character is from the descriptor, I can't
> write C (i.e. the MPI interface) that will work for both.  And that's
> the requirement - having to have different libraries for different
> compiler options is a PAIN.
> Another point here is that I can do this for numeric units, if a compiler
> switches between 4-byte INTEGER and REAL (and 8-byte D.P.) and 8-byte
> INTEGER and REAL (and 16-byte D.P.)  But I can't do it for CHARACTER
> with that approach.
> Regards,
> Nick Maclaren
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran

Bill Long                                           longb at cray.com
Fortran Technical Support    &                 voice: 651-605-9024
Bioinformatics Software Development            fax:   651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101

More information about the mpiwg-fortran mailing list