Re: gomp_target_fini

2016-04-21 Thread Thomas Schwinge
Hi! On Thu, 21 Apr 2016 16:43:22 +0300, Alexander Monakov wrote: > On Tue, 19 Apr 2016, Jakub Jelinek wrote: > > On Tue, Apr 19, 2016 at 04:01:06PM +0200, Thomas Schwinge wrote: > > > [...] Alexander's much smaller patch with subject: "libgomp plugin: make > > > cuMemFreeHost error non-fatal", >

Re: gomp_target_fini

2016-04-21 Thread Alexander Monakov
On Tue, 19 Apr 2016, Jakub Jelinek wrote: > On Tue, Apr 19, 2016 at 04:01:06PM +0200, Thomas Schwinge wrote: > > Two other solutions have been proposed in the past months: Chung-Lin's > > patches with subject: "Adjust offload plugin interface for avoiding > > deadlock on exit", later: "Resolve libg

Re: gomp_target_fini

2016-04-19 Thread Alexander Monakov
On Tue, 19 Apr 2016, Thomas Schwinge wrote: > Well, I certainly had done at least some thinking before proposing this: > we're talking about the libgomp "fatal exit" function, called when > something has gone very wrong, and we're about to terminate the process, > because there's no hope to recover

Re: gomp_target_fini

2016-04-19 Thread Thomas Schwinge
Hi! On Fri, 22 Jan 2016 11:16:07 +0100, Jakub Jelinek wrote: > On Thu, Jan 21, 2016 at 04:24:46PM +0100, Bernd Schmidt wrote: > > On 12/16/2015 01:30 PM, Thomas Schwinge wrote: > > >Now, with the above change installed, GOMP_PLUGIN_fatal will trigger the > > >atexi

Re: gomp_target_fini

2016-04-19 Thread Jakub Jelinek
On Tue, Apr 19, 2016 at 04:01:06PM +0200, Thomas Schwinge wrote: > Two other solutions have been proposed in the past months: Chung-Lin's > patches with subject: "Adjust offload plugin interface for avoiding > deadlock on exit", later: "Resolve libgomp plugin deadlock on exit", > later: "Resolve de

Re: gomp_target_fini

2016-01-25 Thread Mike Stump
t; discourages review. The discussion of the actual problem begins more than >> halfway through your multi-page mail. Please try to be more concise. >> >> On 12/16/2015 01:30 PM, Thomas Schwinge wrote: >>> Now, with the above change installed, GOMP_PLUGIN_fatal will trigger the

Re: gomp_target_fini

2016-01-22 Thread Jakub Jelinek
than > halfway through your multi-page mail. Please try to be more concise. > > On 12/16/2015 01:30 PM, Thomas Schwinge wrote: > >Now, with the above change installed, GOMP_PLUGIN_fatal will trigger the > >atexit handler, gomp_target_fini, which, with the device lock held

Re: gomp_target_fini

2016-01-21 Thread Bernd Schmidt
On 12/16/2015 01:30 PM, Thomas Schwinge wrote: Now, with the above change installed, GOMP_PLUGIN_fatal will trigger the atexit handler, gomp_target_fini, which, with the device lock held, will call back into the plugin, GOMP_OFFLOAD_fini_device, which will try to clean up. Because of the ea

Re: gomp_target_fini

2016-01-20 Thread Thomas Schwinge
t; On Fri, Dec 11, 2015 at 18:27:13 +0100, Jakub Jelinek wrote: > > > > > On Tue, Dec 08, 2015 at 05:45:59PM +0300, Ilya Verbin wrote: > > > > > > +/* This function finalizes all initialized devices. */ > > > > > > + > > > > > > +stat

Re: gomp_target_fini

2016-01-11 Thread Thomas Schwinge
c 08, 2015 at 05:45:59PM +0300, Ilya Verbin wrote: > > > > > +/* This function finalizes all initialized devices. */ > > > > > + > > > > > +static void > > > > > +gomp_target_fini (void) > > > > > +{ > > > > >

Re: gomp_target_fini

2015-12-23 Thread Thomas Schwinge
tion finalizes all initialized devices. */ > > > > + > > > > +static void > > > > +gomp_target_fini (void) > > > > +{ > > > > + [...] > > > > > > The question is what will this do if there are async target tasks still &

gomp_target_fini (was: [gomp4.5] Handle #pragma omp declare target link)

2015-12-16 Thread Thomas Schwinge
; > + > > > +static void > > > +gomp_target_fini (void) > > > +{ > > > + [...] > > > > The question is what will this do if there are async target tasks still > > running on some of the devices at this point (forgotten #pragma omp taskwait > > or similar