I've had a look at the OpenMPI 1.10.3 sources, and the trouble appears to me to 
be that the MPI wrappers declare
the argument

  TYPE(C_PTR), INTENT(OUT) ::  baseptr

inside the BIND(C) interface on the Fortran side (for OpenMPI this would, for 
example be ompi_win_allocate_f), and
the C implementation has "char *baseptr" as parameter. This is incorrect, it 
needs to be

char **baseptr

I believe this actually points to a design weakness of the C-side interface. 
For establishment of a C pointer, usually
functions that return such a pointer are defined (e.g. malloc()). If a formal 
parameter is desired, this should be
a pointer-to-pointer entity, i.e. it would have been better to define the 
MPI_Win_allocate prototype as

int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_comm 
comm, void **baseptr, MPI_Win win);

Note that the C example pretends that this is the case - it passes the address 
of the pointer to
MPI_Win_allocate, not the pointer itself.

Cheers


--
Dr. Reinhold Bader
Leibniz Supercomputing Centre (http://www.lrz.de) / HPC Systems and Services
Tel.: 0049 89 35831 8825  Fax: 8625

_______________________________________________
users mailing list
users@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/users

Reply via email to