[MPI3 Fortran] What if Fortran is the primary interface?

Aleksandar Donev donev1 at llnl.gov
Mon Mar 17 16:24:06 CDT 2008

On Monday 17 March 2008 13:39, Supalov, Alexander wrote:

> Careful: quite a few implementations use INTEGER to represent a handle
> as a bit mask, rather than a pointer.
The best way to handle this kind of argument, IMO, is a type alias (typedef). 
In C that is handled by the preprocessor and so it is essentially a macro, 
but in Fortran it would have to be built-in. It was part of Fortran 2003 
until the very last minute, when it was pulled out due to alleged "technical 
problems" (as you can tell I did not buy that---this was from language 
purists that simply did not want a typedef-like facility in the language).
The MPI Forum could request this be added in Fortran 2008 for the purposes of 
interop. I could help you write the technical specification:

TYPEALIAS :: MPI_COMM=>TYPE(C_PTR) ! Handles are pointers, or
TYPEALIAS :: MPI_COMM=>INTEGER(KIND=INT64) ! Handles are integers


Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev

More information about the mpiwg-fortran mailing list