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

Jeff Squyres jsquyres at cisco.com
Tue Mar 18 09:52:08 CDT 2008


On Mar 18, 2008, at 10:22 AM, Craig Rasmussen 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.


I believe that you should have it be the address of the symbol  
ompi_mpi_comm_world (which is the C value of MPI_COMM_WORLD) -- don't  
use ompi_mpi_comm_world_f.

-- 
Jeff Squyres
Cisco Systems




More information about the mpiwg-fortran mailing list