Hi! On Wed, 12 Nov 2014 11:06:26 +0100, Jakub Jelinek <ja...@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
pgpJQ3VlxhU4N.pgp
Description: PGP signature