From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2561 invoked by alias); 12 Nov 2014 10:55:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2551 invoked by uid 89); 12 Nov 2014 10:55:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Nov 2014 10:55:50 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XoVaU-00068Q-79 from Thomas_Schwinge@mentor.com ; Wed, 12 Nov 2014 02:55:46 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Wed, 12 Nov 2014 10:55:44 +0000 From: Thomas Schwinge To: Jakub Jelinek , Julian Brown , Ilya Verbin CC: Subject: Re: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost) In-Reply-To: <20141112100626.GP5026@tucnak.redhat.com> References: <20140923191931.2177e60f@octopus> <20141111135323.29e0f27b@octopus> <20141112100626.GP5026@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Wed, 12 Nov 2014 10:59:00 -0000 Message-ID: <8761ekpu1h.fsf@schwinge.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2014-11/txt/msg01170.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1912 Hi! On Wed, 12 Nov 2014 11:06:26 +0100, Jakub Jelinek wrote: > On Tue, Nov 11, 2014 at 01:53:23PM +0000, Julian Brown wrote: > > +# TODO. See testsuite/lib/libgomp.exp:libgomp_init. > > +INTERNAL { > > + global: > > + initialize_env; > > +}; This should not have been part of the upstream trunk submission -- it is an internal change, which also is not present on gomp-4_0-branch. > Ugh, I don't like that. Neither do I. ;-/ > If it is a hack around dejagnu deficiency, then > perhaps dejagnu should be changed or gcc *.exp adjusted, if it is for > all programs, then there should be some way how to communicate passing > state from the host to the target plugin. There is no mechanism in DejaGnu to pass environment variables to remote boards (which we're using in internal testing), and we currently use that to circle through available accelerators/libgomp plugins: by setting the ACC_DEVICE_TYPE environment variable. For that, we have to pre-set that environment variable before libgomp initializes, which is difficult (or, not possible), because libgomp's initialization is done via a constructor attribute, and it is not possible from the "main" executable to preempt a dependent shared library's constructors, so we have to "re-initialize" later on... This clearly is a hack, was never meant for upstream, and should be replaced by a different scheme: my idea was that GCC should expose to libgomp the first offloading device, T1, that has been specified with -foffload=3DT1,T2,..., (defaulting to a GCC configure-time list), and then T1 would be used as the default device for OpenACC. This T1,T2,... list could also serve to map the numeric device clause ID enumeration in OpenMP? (As far as I'm aware, there is no scheme in OpenMP to map from "descriptive" device names (intelmic, nvptx, ...) to the numeric IDs used with the device clause?) Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUYzyqAAoJEPoxNhtoi6COmU8H/jd3tPsOXqjuUKEICvKZJ5jV e4jzaHOEMbKaUmHySa5LhlSfhWaEOljiiYBF/KQi42lhIxXYqY2OigOx0+E7qIuI 6gEAGIccVKKNAy4BLSxHnAR+poepL/TuoUXFzFf9+OHZso+NiyXAdSJ+bFfGv35g CWZ+LMZxj4Dm3W2xXFyJPG8JsQMC1A4n5DuwgfFQ4ZqSiHT5G6Nes9y7/AgfshxM fBMGDDpwtvodQ3o+qjspOOWiYOfLs0/vspfcXr00o8kB9L3AF5nz9xVfLKNF2Pvr CKy/hCjLOThKItZncvj1ND7A9+ooFKyEblWm/jzwKkCgVyJihSxiu7HtQeKq9I0= =YiR1 -----END PGP SIGNATURE----- --=-=-=--