[MPI3 Fortran] Start discussing new Fortran binding
Craig Rasmussen
crasmussen at lanl.gov
Wed Mar 5 09:53:48 CST 2008
II have scheduled an audio conference "MPI Fortran" or for March 7,
2008 from 11am to 12am Eastern.
The dial in numbers are 505-665-2778 local and 866-736-2112 toll free.
You will NOT need a password to access the teleconference.
Cheers,
Craig
On Feb 21, 2008, at 5:53 PM, Jeff Squyres wrote:
> On Feb 19, 2008, at 10:27 AM, Craig Rasmussen wrote:
>
>> Don't know if there are implementations where the MPI handle is not
>> an integer of size of an address. Would your suggestion work if it
>> were?
>
> Actually, does it matter?
>
> In the MPI spec, we can just mandate this part:
>
> type, BIND(C) :: MPI_HANDLE_TYPE
> private
> ....something....
> end type MPI_HANDLE_TYPE
>
> So that MPI_HANDLE_TYPE is required to be available in Fortran. What
> exactly it contains and how it is implemented is up to each MPI
> implementation. They can make it an equivalent of a C pointer, or a C
> int, or whatever they need.
>
> Let's take two obvious concrete examples:
>
> 1. Open MPI defines C MPI communicators as
>
> typedef struct ompi_comm_t * MPI_Comm;
>
> As such, Open MPI's F03 interface for communicators would be:
>
> type, BIND(C) :: MPI_COMMUNICATOR
> private
> type(C_PTR) :: handle
> end type MPI_COMMUNICATOR
>
> 2. MPICH2 defines C MPI communicators as ints. Hence, MPICH2's F03
> interface for communicators would be:
>
> type, BIND(C) :: MPI_COMMUNICATOR
> private
> type(C_INT) :: handle
> end type MPI_COMMUNICATOR
>
> Is that right?
>
> If so, my only concern is that the compiler can automatically
> translate between the F03 and C values without the need for a
> translation layer provided by the MPI implementation. That is, a
> Fortran function of MPI_SEND that takes an MPI_COMMUNICATOR type
> parameter (as described above) can be automatically translated to the
> appropriate MPI_Comm type in C. That is one of the goals of this
> interface, after all.
>
> The reason that I mention this is because I'm a C guy, not a Fortran
> guy, and the above "type, BIND(C)..." stuff looks analogous to a
> struct to me. If it is, and if that binding contains more than one
> member, are we ok on the "compiler will automatically translate it"
> front as long as there is only one member in the binding?
>
> An excellent topic for the teleconference! :-)
>
> --
> Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> mpi3-fortran mailing list
> mpi3-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20080305/3668f9ce/attachment.html>
More information about the mpiwg-fortran
mailing list