MPI Forum Meetings logo

MPI Forum: mpi3-fortran Mailing List Archives

all MPI Forum: mpi3-fortran mailing list

Subject: Re: [MPI3 Fortran] What if Fortran is the primary interface?
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-03-18 10:52:08


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