public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>,
	Julian Brown <julian@codesourcery.com>,
	Ilya Verbin <iverbin@gmail.com>
Cc: <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)
Date: Wed, 12 Nov 2014 10:59:00 -0000	[thread overview]
Message-ID: <8761ekpu1h.fsf@schwinge.name> (raw)
In-Reply-To: <20141112100626.GP5026@tucnak.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]

Hi!

On Wed, 12 Nov 2014 11:06:26 +0100, Jakub Jelinek <jakub@redhat.com> 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=T1,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üße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2014-11-12 10:55 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 18:20 [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin Julian Brown
2014-11-11 13:54 ` [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost) Julian Brown
2014-11-12 10:10   ` Jakub Jelinek
2014-11-12 10:59     ` Thomas Schwinge [this message]
2014-11-12 21:11       ` Mike Stump
2014-11-12 11:06     ` Julian Brown
2014-11-12 11:15       ` Jakub Jelinek
2014-11-12 11:33     ` libgomp: "GNU OpenMP Runtime Library" (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-12 11:49       ` Jakub Jelinek
2014-11-12 13:40         ` David Malcolm
2014-11-12 13:49           ` Jakub Jelinek
2014-11-12 20:30             ` David Malcolm
2014-11-12 20:41               ` Jakub Jelinek
2014-11-12 20:50                 ` David Malcolm
2015-01-11  2:18                   ` libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: "GNU OpenMP Runtime Library") Thomas Schwinge
2015-01-29 10:25                     ` Thomas Schwinge
2019-05-28 21:27                       ` libgomp: long known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: "GNU OpenMP Runtime Library")) Thomas Schwinge
     [not found]     ` <20141113232615.4ff373bf@octopus>
2014-11-14 16:07       ` Fortran/C interfacing (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-14 21:01         ` Fortran/C interfacing Tobias Burnus
2014-11-14 21:24           ` Jakub Jelinek
2014-11-14 16:38     ` GOMP_DEBUG environment variable? (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-15  1:04     ` [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost) Julian Brown
2014-11-19 19:58       ` Bernd Schmidt
2014-11-19 20:39         ` Cesar Philippidis
2014-12-22 17:55   ` Thomas Schwinge
2014-12-22 18:05   ` Thomas Schwinge
2014-12-22 18:12   ` Thomas Schwinge
2014-12-22 18:16   ` Thomas Schwinge
2014-12-22 18:55   ` Thomas Schwinge
2014-12-23  0:57   ` Thomas Schwinge
2014-12-22 16:41 ` [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin Thomas Schwinge
2015-01-12 14:49 ` Thomas Schwinge
2015-01-12 15:07   ` Thomas Schwinge
2015-01-12 15:00 ` Thomas Schwinge
2017-02-02 14:38 ` libgomp, nvptx plugin: Make "nvptx_exec" static (was: [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin) Thomas Schwinge
2022-05-12 11:32 ` libgomp plugins: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX' " Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761ekpu1h.fsf@schwinge.name \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iverbin@gmail.com \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).