[MPIWG Fortran] Type of MPI_Status

Bill Long longb at cray.com
Mon Mar 17 15:03:08 CDT 2014


On Mar 17, 2014, at 2:48 PM, Jeff Squyres (jsquyres) <jsquyres at cisco.com> wrote:

> On Mar 17, 2014, at 3:39 PM, Bill Long <longb at cray.com> wrote:
> 
>> Ultimately, the problem always comes back to the decision to use default INTEGER and REAL declarations in the MPI interfaces.  It appears that OpenMPI is opting for specific KIND values instead.
> 
> Yes, but my KIND is the default INTEGER kind -- not the C_INT kind.  Mine is solely for the purpose of making it BIND(C)-able:
> 
>   ! Get the KIND value that will be compatible with C, but also be a              
>   ! default INTEGER.  That way, all the BIND(C) types below will be               
>   ! compatible with BIND(C) (because their member(s) will be BIND(C)              
>   ! compatible).  

Better make sure there is a variable named INTEGER that is type default INTEGER for the statement below to work.  The more common usage is just KIND(0).

>                                                                
>   integer, parameter :: OMPI_INT_KIND = kind(INTEGER)

This does not appear to accomplish anything (other than irritate Rolf).  If INTEGER(OMPI_INT_KIND) is interoperable, and suitable for a BIND(C) interface, then so is INTEGER.  If you compile with -i8, OMPI_INT_KIND will switch from 4 to 8 (most implementations), but INTEGER would have the same effect. 

Cheers,
Bill

> 
>   type, BIND(C) :: MPI_Comm
>      integer(OMPI_INT_KIND) :: MPI_VAL
>   end type MPI_Comm
> 
> (similar thing with MPI_Status)
> 
> -- 
> Jeff Squyres
> jsquyres at cisco.com
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
> 
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran

Bill Long                                                                       longb at cray.com
Fortran Technical Suport  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101





More information about the mpiwg-fortran mailing list