[Mpi-22] [MPI Forum] #55: MPI-2.1 Cross-language attribute example is wrong

William Gropp wgropp at [hidden]
Sat Apr 4 14:56:11 CDT 2009

The fundamental problem here is that C encourages users to work with  
addresses of objects and in Fortran 77, there was no user-visible  
addresses at all.  "Pointers" in Fortran 90 are also different from  
addresses.  In many ways, the real mistake is trying to establish a  
correspondence between the Fortran and C/C++ versions.  Permitting  
"Address-sized" integers in Fortran doesn't change the fact that you  
can't use them in the same way in Fortran as in C.  Much of the  
struggle in this ticket is trying to work around this, as well as the  
decision (in MPI 1.0) to return pointers for all attributes in C, even  
for integer-valued predefined attributes.


On Apr 4, 2009, at 12:33 PM, MPI Forum wrote:

> #55: MPI-2.1 Cross-language attribute example is wrong
> ----------------------------------- 
> +----------------------------------------
> Reporter:  jsquyres                |            Owner:  jsquyres
>    Type:  Correction to standard  |           Status:  assigned
> Priority:  Waiting for reviews     |        Milestone:  2009/04/06  
> Chicago
> Version:  MPI 2.2                 |       Resolution:
> Keywords:                          |   Implementation:  Completed
> ----------------------------------- 
> +----------------------------------------
> Comment(by rsthakur):
> Note that if you get the value of MPI_TAG_UB in Fortran with
> MPI_Comm_get_attr, you will get an address-sized value (487:48,  
> 488:1).
> But in C you will get a pointer to an int-sized value. Does not seem
> right.
> -- 
> Ticket URL: <https://svn.mpi-forum.org/trac/mpi-forum-web/ticket/55#comment:54 
> >
> MPI Forum <https://svn.mpi-forum.org/>
> MPI Forum

William Gropp
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign

More information about the Mpi-22 mailing list