From Terry.Dontje@XXXXXXX Thu Feb 7 09:53:29 2008 Date: Thu, 07 Feb 2008 10:49:12 -0500 From: Terry Dontje In-reply-to: <0367FBAD-2ACE-4BBD-99D8-9D2FB6E0F92B@XXXXXXXXX>To: mpi-21@XXXXXXXXXXXXX Message-id: <47AB2878.8060102@XXXXXXX>MIME-version: 1.0 References: <0367FBAD-2ACE-4BBD-99D8-9D2FB6E0F92B@XXXXXXXXX> User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) X-Spam-Details: rule=tag_notspam policy=tag score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0801230000 definitions=main-0802070042 X-Spam-OrigSender: Terry.Dontje@XXXXXXX X-Spam-Bar: Cc: mpi-21@XXXXXXXXXXX Subject: Re: [mpi-21] Ballot 4 proposal: fix attribute example 4.13 X-BeenThere: mpi-21@XXXXXXXXXXX X-Mailman-Version: 2.1.8 Precedence: list Reply-To: "Mailing list for discussion of MPI 2.1" List-Id: "Mailing list for discussion of MPI 2.1" List-Archive: List-Post: List-Help: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mpi-21-bounces@XXXXXXXXXXX Errors-To: mpi-21-bounces@XXXXXXXXXXX X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailgw.mcs.anl.gov Sorry I didn't send this out sooner but in reading the discussion for the errata item "Interlaguage use of Attributes" I think the below proposal has a potential hole that never was resolved in the mail discussion in: http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/discuss/getattr/ The specific hole pointed out by Nick Nevin in the following paragraph from the email discussion: This might work for predefined attributes where the address can point to the integer value in static storage, but won't work for attributes set by the user in Fortran code. If you store a pointer to the integer as the attribute it may point to a temporary which might no longer exist when you try and access it later. So I think relying on the address passed in for the attribute as opposed to the value could cause some issues with Fortran. --td Jeff Squyres wrote: > Per > http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/, > the errata item entitled "Error in Example 4.13 in MPI-2 (Use of > Attributes in C and Fortran)". I believe that this errata item > supersedes the errata item "Interlanguage use of Attributes". > > See the mail discussing: > > http://www.cs.uiuc.edu/homes/wgropp/projects/parallel/MPI/mpi-errata/discuss/attrcandf/ > > > Proposal: > > Change MPI-2:4.12, p58:36 from: > IF (val.NE.5) THEN CALL ERROR > to > IF (val.NE.address_of_i) THEN CALL ERROR > > Rationale: > > MPI-2:4.12 p58:12-13 and 16-18 clearly state that if an attribute is > set by C, retrieving it in Fortran will obtain the address of the > attribute. > > See the mails for more discussion, including an exhaustive list of > what happens for each of the 9 possibilities of setting and getting > attribute values between the different languages. > _______________________________________________ mpi-21 mailing list mpi-21@XXXXXXXXXXX http://lists.cs.uiuc.edu/mailman/listinfo/mpi-21