X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Fri, 26 Mar 1999 07:47:53 -0600 To: Nicholas Nevin - Sun HPC High Performance Computing From: William Gropp Subject: Re: clarification on inter-language interoperability of attributes Cc: mpi-core@XXXXXXXXXXX In-Reply-To: <199903252137.QAA03613@XXXXXXXXXXXXXXXXX> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-mpi-core@XXXXXXXXXXX Precedence: bulk X-UIDL: 47212bebeaa240b89c7072e01f92cdf6 At 04:37 PM 3/25/99 -0500, Nicholas Nevin - Sun HPC High Performance Computing wrote: > >Hi, All. I need some clarification on the behaviour of MPI_Comm_get_attr >in the case of an architecture with 32 bit ints and 64 bit pointers. > >Section 4.12.7 of the MPI-2 standard states that MPI will store >internally *address* sized attributes. It also states that an integer >valued attribute when accessed from C via MPI_Comm_get_attr will return >the address of a pointer to the integer valued attribute. > >This seems to imply that MPI_Comm_get_attr will return a pointer to >a 64 bit quantity. This however will break codes which do this. No, it means that the attribute is stored as the address itself. The thing that the attribute points to may be an int, a long long, or a structure. That's why an MPI_TAG_UB is returned as the address of an int. We've been doing this for a long time with MPICH on many architectures with 32 bit C ints and 64 bit pointers (it is one of the reasons why Get_attr returns a pointer to the integer containing the tag UB, rather than the value of the UB itself). Bill