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?? On 10/22/07, Satish Balay <balay at mcs.anl.gov> wrote: > On Mon, 22 Oct 2007, Lisandro Dalcin wrote: > > > Did you take into accout that MPI defines MPI_Aint for this? I believe > > we can reuse that definition, perhaps typedefing it as PetscAint or > > PetscAInt, > > > > What do you think? > > MPI datatypes are c-only - hence not useful for us. For eg: MPI_Comm, > MPI_Aint are C datatypes. The equivalent on the fortran side are > integers. [I guess - the standard wanted to use only the available > native F77 datatypes]. > > This usually means there could be a mismatch between fortran & c > datatypes. [For eg: on 64bit machines, MPI_Aint is 64bit - whereas > fortran 'integer' is 32bit]. To handle this mismatch - conversion is > usually necessary between these types in the fortran interface > routines [using MPI_Fint as an equvalent for fortran integer] for eg: > > MPI_Fint fcomm = MPI_Comm_c2f(MPI_Comm comm); > MPI_Fint foffset = (MPI_Fint)(MPI_Aint offset); > [i.e int = (int)(long) => possible truncation] > > However we try to keep the fortan and C datatypes similar - so that > such conversions are not necessary. [and we don't have to deal will > errors associated with them] > > Satish > > -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
