From jsquyres@XXXXXXXXX Thu Feb 7 11:25:46 2008 Delivered-To: mpifrm-mpi-21-outgoing@XXXXXXXXXXXXXXXXXXXXXXX X-Original-To: mpifrm-mpi-21@XXXXXXXXXXXXXXXXXXXXXXX Delivered-To: mpifrm-mpi-21@XXXXXXXXXXXXXXXXXXXXXXX Cc: mpi-21@XXXXXXXXXXXXX From: Jeff Squyres To: "Mailing list for discussion of MPI 2.1" In-Reply-To: <47AB3A06.7050603@XXXXXXX> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: [mpi-21] Ballot 4 proposal: fix attribute example 4.13 Date: Thu, 7 Feb 2008 12:25:05 -0500 References: <0367FBAD-2ACE-4BBD-99D8-9D2FB6E0F92B@XXXXXXXXX> X-Mailer: Apple Mail (2.915) X-OriginalArrivalTime: 07 Feb 2008 17:25:18.0557 (UTC) FILETIME=[68EBD0D0:01C869AE] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=2839; t=1202405135; x=1203269135; c=relaxed/simple; s=rtpdkim1001; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=jsquyres@XXXXXXXXXX z=From:=20Jeff=20Squyres=20 |Subject:=20Re=3A=20[mpi-21]=20Ballot=204=20proposal=3A=20f ix=20attribute=20example=204.13 |Sender:=20 |To:=20=22Mailing=20list=20for=20discussion=20of=20MPI=202. 1=22=20; bh=RPAZrueLzVvsMgeK1DAntUESkhfzl9LOuj1jGliaY64=; b=YK9KB8v05P4psyPF15vaGLxKpk9IdrEa4/95UarCwbggQsOYJfYdMDfphP tpENlJk9xKPHsxpfAc6o8YzEBZ/3MCwpMrkUk1Rzgq0/TvbuEY6byBk1CoFU Q4gaACCp7a; Authentication-Results: rtp-dkim-1; header.From=jsquyres@XXXXXXXXXX dkim=pass ( sig from cisco.com/rtpdkim1001 verified; ); X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailbouncer.mcs.anl.gov Sender: owner-mpi-21@XXXXXXXXXXXXX Precedence: bulk Reply-To: mpi-21@XXXXXXXXXXXXX X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mailbouncer.mcs.anl.gov Terry and I further noticed that there appears to be another minor problem in example 4.13. So here's an addendum to the proposal: MPI-2:4.12.7 p59 line 1 reads: int *p But should read MPI_Aint *p Rationale: The value that is set from fortran is an INTEGER(kind=MPI_ADDRESS_KIND). Hence, to dereference it properly, the corresponding C pointer type needs to be an (MPI_Aint*), not (int*). On Feb 7, 2008, at 12:04 PM, Terry Dontje wrote: > After talking with Jeff and reading the spec further I retract my > concern because the spec does explicitly cover my concern in the > verbage > above example 4.13. > > --td > > Terry Dontje wrote: >> 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 -- Jeff Squyres Cisco Systems