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

Craig Rasmussen crasmussen at lanl.gov
Tue Mar 18 09:22:32 CDT 2008


On Mar 17, 2008, at 1:53 PM, Jeff Squyres wrote:

> FWIW, I don't think the 2-level indirection is necessary.  I think
> that Craig was trying to unify everything, but I would agree with
> Hubert: it would be better if MPI_COMM directly referred to whatever
> the Right stuff is in C.
>

Right.  I don't have the two levels of indirection.  I defined it as:

        type(MPI_HANDLE), protected, bind(C,  
name="ompi_mpi_comm_world_f") :: MPI_COMM_WORLD

This seems to work in OpenMPI.  Though perhaps not as I currently  
have to call mpi_init_f_c() after each MPI_Recv call.  Somewhere the  
pointers are getting tromped on.

Craig



> In Open MPI's case, for example, the private member would be a pointer
> to an ompi_communicator_t struct instance.
>
>
> On Mar 17, 2008, at 2:54 PM, Hubert Ritzdorf wrote:
>
>> Hi Alexander,
>>
>> Jeff and Torsten are right. We have special implementations
>> for frequently used Fortran functions. But this Fortran MPI
>> functions are implemented in C.
>>
>> I think, that it will be difficult to convince real Fortran
>> programmers
>> by this C interface. They have to re-write main parts of the code.
>> change it from Fortran Style into C Style and what is the benefit ?
>>
>> I have an additional question. Is this really guaranteed by the
>> Fortran 2003 standard that
>>
>> type, bind(C) :: MPI_HANDLE
>> private  ! Components not visible
>> type(C_PTR) :: HANDLE
>> end type MPI_HANDLE
>>
>> type, bind(C) :: MPI_COMM
>> private
>> type(MPI_HANDLE) :: handle
>> end type MPI_COMM
>>
>> type(MPI_COMM), bind(C), protected :: MPI_COMM_WORLD
>>
>> err = MPI_Recv (..., ..., MPI_COMM_WORLD, ...)
>> in the same C Pointer such as the MPI_Comm MPI_COMM_WORLD ?
>> My feeling is that it points to a structure containing the C pointer
>> MPI_COMM_WORLD.
>>
>> Hubert
>>
>> Supalov, Alexander wrote:
>>> Hi everybody,
>>>
>>> It appears to me that the current proposal basically intends to pass
>>> data thru to the presumably existing C implementation layer. How  
>>> will
>>> this work for an implementation where the Fortran binding is a
>>> primary
>>> one?
>>>
>>> I believe that at least NEC has followed this route. I'm adding
>>> Hubert
>>> Ritzdorf, in case he's accidentally not involved into this  
>>> discussion
>>> yet, to verify NEC's position.
>>>
>>> Best regards.
>>>
>>> Alexander
>>> --
>>> Dr Alexander Supalov
>>> Intel GmbH
>>> Hermuelheimer Strasse 8a
>>> 50321 Bruehl, Germany
>>> Phone:          +49 2232 209034
>>> Mobile:          +49 173 511 8735
>>> Fax:              +49 2232 209029
>>> -------------------------------------------------------------------- 
>>> -
>>> Intel GmbH
>>> Dornacher Strasse 1
>>> 85622 Feldkirchen/Muenchen Germany
>>> Sitz der Gesellschaft: Feldkirchen bei Muenchen
>>> Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
>>> Registergericht: Muenchen HRB 47456 Ust.-IdNr.
>>> VAT Registration No.: DE129385895
>>> Citibank Frankfurt (BLZ 502 109 00) 600119052
>>>
>>> This e-mail and any attachments may contain confidential material  
>>> for
>>> the sole use of the intended recipient(s). Any review or  
>>> distribution
>>> by others is strictly prohibited. If you are not the intended
>>> recipient, please contact the sender and delete all copies.
>>>
>>>
>>>
>> _______________________________________________
>> mpi3-fortran mailing list
>> mpi3-fortran at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
>
>
> -- 
> 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




More information about the mpiwg-fortran mailing list