From: rusrabe@XXXXXXXXXXXXXXXXXXXXXXXXXX Subject: Re: clarification on inter-language interoperability of attributes To: snir@XXXXXXXXXX Date: Fri, 26 Mar 1999 09:53:40 +0100 (MEZ) Cc: nevin@XXXXXXXXXXXXXXXXX,mpi-core@XXXXXXXXXXX In-Reply-To: <8525673F.0080699E.00@XXXXXXXXXXXXXXXXXXXX> Content-Type: text Sender: owner-mpi-core@XXXXXXXXXXX Precedence: bulk X-UIDL: f62bf11b26729f31fec984011630bb21 Nick Nevin mentioned: > MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &tagub, &flag); ========== Marc Snir stated: > It's a bad idea to store and retrieve integer attributes in C -- since C stores > and retrieves attributes of type void* (pointers). You can either ========== [...] > int ub; > MPI_Comm_put_attr(..., (void*)ub,...); [or] > int ub; > int *tagub > *tagub = ub; > MPI_Comm_put_attr(..., tagub,...); But MPI 1.1 has defined 4 predefined INTEGER/int-typed attributes in the "7.1.1 Environmental Inquiries", and therefore, the question is, which "MPI_Comm_put_attr" is done by all MPI implementations. === Rolf PS: I have no opinion, what is the right answer, but when it will be clear, it would be nice, if we add as clarification an example, how to use MPI_Comm_get_attr with the predefined valus in Fortran and C.