Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-10 Thread Iain Sandoe
Hi Jakub, Rainer, > On 9 Sep 2022, at 23:17, Jakub Jelinek wrote: > > On Fri, Sep 09, 2022 at 11:13:52PM +0100, Iain Sandoe wrote: >> We already have such a header … >> include/environ.h > > Ah, ok, then please just use it. Seems libgomp Makefile.am > already includes -I$(top_srcdir)/../includ

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-09 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 09, 2022 at 11:13:52PM +0100, Iain Sandoe wrote: > We already have such a header … > include/environ.h Ah, ok, then please just use it. Seems libgomp Makefile.am already includes -I$(top_srcdir)/../include So just include that and remove the extern char **environ; from the constructo

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-09 Thread Iain Sandoe
> On 9 Sep 2022, at 23:08, Jakub Jelinek wrote: > > On Fri, Sep 09, 2022 at 10:50:19PM +0200, Rainer Orth wrote: >> Hi Jakub, >> >>> On Wed, Aug 31, 2022 at 12:56:25PM +0200, Marcel Vollweiler wrote: libgomp/ChangeLog: >> [...] (initialize_env): Extended to parse the new syntax o

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-09 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 09, 2022 at 10:50:19PM +0200, Rainer Orth wrote: > Hi Jakub, > > > On Wed, Aug 31, 2022 at 12:56:25PM +0200, Marcel Vollweiler wrote: > >> libgomp/ChangeLog: > [...] > >>(initialize_env): Extended to parse the new syntax of environment > >>variables. > > this patch broke Darwi

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-09 Thread Rainer Orth
Hi Jakub, > On Wed, Aug 31, 2022 at 12:56:25PM +0200, Marcel Vollweiler wrote: >> libgomp/ChangeLog: [...] >> (initialize_env): Extended to parse the new syntax of environment >> variables. this patch broke Darwin bootstrap: Undefined symbols for architecture x86_64: "_environ", refe

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 31, 2022 at 12:56:25PM +0200, Marcel Vollweiler wrote: > libgomp/ChangeLog: > > * config/gcn/icv-device.c (omp_get_default_device): Return device- > specific ICV. > (omp_get_max_teams): Added for GCN devices. > (omp_set_num_teams): Likewise. > (ialias): Li

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-08-31 Thread Marcel Vollweiler
nd hope that it's ok now. + struct gomp_icv_list + { + int device_num; + struct gomp_initial_icvs icvs; + uint32_t flags; Put flags after device_num to avoid some useless padding? Good spot. Changed. + struct gomp_icv_list *next; + }; +extern struct gomp_icv_list* gomp

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-08-22 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 02, 2022 at 09:52:02AM +0200, Marcel Vollweiler wrote: > libgomp/ChangeLog: > > * config/gcn/icv-device.c (omp_get_default_device): Return device- > specific ICV. > (omp_get_max_teams): Added for GCN devices. > (omp_set_num_teams): Likewise. > (ialias): Li

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-07-25 Thread Marcel Vollweiler
#define OMP_WAIT_POLICY_DEV_ 14 +#define OMP_STACKSIZE_DEV_ 15 +#define OMP_DEFAULT_DEVICE_DEV_ 16 These aren't constans defined in OpenMP standard, so I think it would be better to use different prefixes, say GOMP_ICV_WHATEVER or GOMP_ENV_WHATEVER. OMP_NONE is very much non-descri

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-07-04 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 30, 2022 at 01:40:24PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Fri, Jun 10, 2022 at 03:59:37PM +0200, Marcel Vollweiler wrote: > > > I'm not sure we can rely on execv on all targets that do support libgomp. > > > Any reason why you actually need this, rather than using > > > dg

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-06-30 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 30, 2022 at 03:21:15PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, Jun 30, 2022 at 01:40:24PM +0200, Jakub Jelinek via Gcc-patches wrote: > > > +/* The initial ICV values for the host, which are configured with > > > environment > > > + variables without a suffix, e.g. OMP_

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-06-30 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 30, 2022 at 01:40:24PM +0200, Jakub Jelinek via Gcc-patches wrote: > > +/* The initial ICV values for the host, which are configured with > > environment > > + variables without a suffix, e.g. OMP_NUM_TEAMS. */ > > +struct gomp_initial_icvs gomp_initial_icvs_none; > > + > > +/* Init

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-06-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 10, 2022 at 03:59:37PM +0200, Marcel Vollweiler wrote: > > I'm not sure we can rely on execv on all targets that do support libgomp. > > Any reason why you actually need this, rather than using > > dg-set-target-env-var directive(s) and perhaps return 0; if getenv doesn't > > return the

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-05-04 Thread Tobias Burnus
On 04.05.22 17:12, Jakub Jelinek via Gcc-patches wrote: Though, there is one gotcha, if we had code where we parsed some var first and another one later and there was interdependence between the two, in environ they can appear in any order. I think for interdependence it depends whether in a fi

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-05-04 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 18, 2022 at 05:10:47PM +0100, Marcel Vollweiler wrote: > Hi, > > This patch considers the environment variable syntax extension for > device-specific variants of environment variables from OpenMP 5.1 (see > OpenMP 5.1 specification, p. 75 and p. 639). An environment variable > (e.g. OM

[PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-01-18 Thread Marcel Vollweiler
-- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 OpenMP, libgomp: Environment variable syntax extension.

OpenMP, libgomp: Environment variable syntax extension.

2022-01-18 Thread Marcel Vollweiler
d. Marcel - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 OpenMP, libgomp: Environment variable syntax