On Mon, 22 Oct 2007, Satish Balay wrote: > > > On Mon, 22 Oct 2007, Lisandro Dalcin wrote: > > > Sathis, I have not much experience with fortran, but... if you take a > > look for example at > > > > http://www.mpi-forum.org/docs/mpi-20-html/node54.htm > > > > you will see > > > > MPI_ALLOC_MEM(SIZE, INFO, BASEPTR, IERROR) > > INTEGER INFO, IERROR > > INTEGER(KIND=MPI_ADDRESS_KIND) SIZE, BASEPTR > > > > So what the meaning of INTEGER(KIND=MPI_ADDRESS_KIND) is supposed to be?? > > If you check mpich2-1.0.5p4/src/binding/f77/type_extentf.c > > #include "fproto.h" > FORT_DLL_SPEC void FORT_CALL mpi_type_extent_ ( MPI_Fint *v1, MPI_Fint * v2, > MPI_Fint *ierr ){ > MPI_Aint l2; > *ierr = MPI_Type_extent( (MPI_Datatype)(*v1), &l2 ); > *v2 = (MPI_Fint)(l2); > } > > MPI_Aint [on the c side] is used ambiguously as either > INTEGER(KIND=MPI_ADDRESS_KIND) for MPI_ALLOC_MEM or 'INTEGER' for > MPI_Type_extent.
Ok - I'm getting mislead by the old MPI-1 book I have [perhaps bugs in it]. Also the ambiguous routines in MPI-1 [like MPI_Type_extent] are depricated in MPI-2. Now MPI_Fint is properly defined in MPI-2 standard [as far as F90 is concerned] as INTEGER(KIND=MPI_ADDRESS_KIND) So sizeof(MPI_Aint) should probably be same as sizeof(size_t) [with MPI-2 boundaries], and the fortran code needs to use the appropriate datatype. So it might be ok. [we'll still need to define an equivalnet fortran type.] It just looks awkward to me to use it instead of size_t - but thats just me..] Satish
