Fortran OpenACC host_data construct ICE (was: [gomp4] Re: [OpenACC 0/7] host_data construct)

2016-04-08 Thread Thomas Schwinge
Hi! On Wed, 2 Dec 2015 23:13:58 +0100, I wrote: > On Wed, 2 Dec 2015 16:58:45 +0100, I wrote: > > Cesar and Jim copied, for help with Fortran and generally testsuite > > things. (Just in case you happen to have any ideas.) > > On Mon, 30 Nov 2015 19:30:34 +, Julian Brown > > wrote: > > > [

Re: [OpenACC 0/7] host_data construct

2016-02-02 Thread Thomas Schwinge
Hi! On Wed, 2 Dec 2015 16:58:45 +0100, I wrote: > On Mon, 30 Nov 2015 19:30:34 +, Julian Brown > wrote: > > --- a/libgomp/oacc-parallel.c > > +++ b/libgomp/oacc-parallel.c > > > +void > > +GOACC_host_data (int device, size_t mapnum, > > +void **hostaddrs, size_t *sizes, unsigned

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-12-23 Thread Thomas Schwinge
Hi! On Mon, 26 Oct 2015 19:34:22 +0100, Jakub Jelinek wrote: > Your use_device sounds very similar to use_device_ptr clause in OpenMP, > which is allowed on #pragma omp target data construct and is implemented > quite a bit differently from this; it is unclear if the OpenACC standard > requires t

[gomp4] Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Thomas Schwinge
Hi! On Wed, 2 Dec 2015 16:58:45 +0100, I wrote: > Cesar and Jim copied, for help with Fortran and generally testsuite > things. > > On Mon, 30 Nov 2015 19:30:34 +, Julian Brown > wrote: > > [patch] > > First, thanks! Aside from a number of formatting/re-ordering changes, the front end cha

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Cesar Philippidis
On 12/02/2015 11:35 AM, Jakub Jelinek wrote: > On Wed, Dec 02, 2015 at 11:16:10AM -0800, Cesar Philippidis wrote: >>> --- gcc/testsuite/gfortran.dg/goacc/coarray_2.f90 >>> +++ gcc/testsuite/gfortran.dg/goacc/coarray_2.f90 >>> @@ -3,6 +3,7 @@ >>> ! >>> ! PR fortran/63861 >>> ! { dg-xfail-if "

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Jakub Jelinek
On Wed, Dec 02, 2015 at 11:16:10AM -0800, Cesar Philippidis wrote: > > --- gcc/testsuite/gfortran.dg/goacc/coarray_2.f90 > > +++ gcc/testsuite/gfortran.dg/goacc/coarray_2.f90 > > @@ -3,6 +3,7 @@ > > ! > > ! PR fortran/63861 > > ! { dg-xfail-if "" { *-*-* } } > > +! {

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Steve Kargl
On Wed, Dec 02, 2015 at 11:16:10AM -0800, Cesar Philippidis wrote: > > This host_data patch exposed a bug in the fortran front end where it was > allowing arrays to be used as reduction variables. If replace you > replace codimension with dimension, you'd see a similar ICE. The > attached patch, w

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Cesar Philippidis
On 12/02/2015 07:58 AM, Thomas Schwinge wrote: > diff --git gcc/testsuite/gfortran.dg/goacc/coarray.f95 > gcc/testsuite/gfortran.dg/goacc/coarray.f95 > index 130ffc3..d2f10d5 100644 > --- gcc/testsuite/gfortran.dg/goacc/coarray.f95 > +++ gcc/testsuite/gfortran.dg/goacc/coarray.f95 > @@ -1,7 +1,9

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Thomas Schwinge
Hi! Cesar and Jim copied, for help with Fortran and generally testsuite things. On Mon, 30 Nov 2015 19:30:34 +, Julian Brown wrote: > [patch] First, thanks! > Tests look OK (libgomp/gcc/g++/libstdc++), and the new ones pass. I see a regression (ICE) in gfortran.dg/goacc/coarray.f95 (done

Re: [OpenACC 0/7] host_data construct

2015-12-02 Thread Tom de Vries
On 30/11/15 20:30, Julian Brown wrote: libgomp/ * oacc-parallel.c (GOACC_host_data): New function. * libgomp.map (GOACC_host_data): Add to GOACC_2.0.1. * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New

Re: [OpenACC 0/7] host_data construct

2015-12-01 Thread Jakub Jelinek
On Mon, Nov 30, 2015 at 07:30:34PM +, Julian Brown wrote: > Julian Brown > Cesar Philippidis > James Norris > > gcc/ > * c-family/c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA. > * c-family/c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA. c-family/, c/

Re: [OpenACC 0/7] host_data construct

2015-11-30 Thread Julian Brown
On Thu, 19 Nov 2015 16:57:23 +0100 Jakub Jelinek wrote: > If it is unclear, I think disallowing acc {parallel,kernels} inside of > acc host_data might be too big hammer, but perhaps just erroring out > or warning during gimplification that if you (explicitly or > implicitly) try to map a var that

Re: [OpenACC 0/7] host_data construct

2015-11-19 Thread Jakub Jelinek
On Thu, Nov 19, 2015 at 02:26:50PM +, Julian Brown wrote: > OK, thanks -- as to what the standard says, it's so ill-specified in > this area that nothing can be learned about the behaviour of offloaded > regions within host_data constructs, and my question about that on the > technical mailing

Re: [OpenACC 0/7] host_data construct

2015-11-19 Thread Julian Brown
On Thu, 19 Nov 2015 14:13:45 +0100 Jakub Jelinek wrote: > On Wed, Nov 18, 2015 at 12:47:47PM +, Julian Brown wrote: > > The FE/gimplifier part is okay, but I really don't like the > omp-low.c changes, mostly the *lookup_decl_in_outer_ctx* changes. > If I count well, we have right now 27 mayb

Re: [OpenACC 0/7] host_data construct

2015-11-19 Thread Jakub Jelinek
On Wed, Nov 18, 2015 at 12:47:47PM +, Julian Brown wrote: The FE/gimplifier part is okay, but I really don't like the omp-low.c changes, mostly the *lookup_decl_in_outer_ctx* changes. If I count well, we have right now 27 maybe_lookup_decl_in_outer_ctx callers and 7 lookup_decl_in_outer_ctx ca

Re: [OpenACC 0/7] host_data construct

2015-11-18 Thread Julian Brown
On Thu, 12 Nov 2015 11:16:21 + Julian Brown wrote: > Here's a version of the patch which (hopefully) brings OpenACC on par > with OpenMP with respect to use_device/use_device_ptr variables. The > implementation is essentially the same now for OpenACC as for OpenMP > (i.e. using mapping struct

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-11-13 Thread Jakub Jelinek
On Mon, Nov 02, 2015 at 06:33:39PM +, Julian Brown wrote: > Firstly, on trunk at least, use_device_ptr variables are restricted to > pointer or array types: that restriction doesn't exist in OpenACC, nor > actually could I find it in the OpenMP 4.1 document (my guess is the > standards are supp

Re: [OpenACC 0/7] host_data construct

2015-11-12 Thread Julian Brown
On Mon, 2 Nov 2015 18:33:39 + Julian Brown wrote: > On Mon, 26 Oct 2015 19:34:22 +0100 > Jakub Jelinek wrote: > > > Your use_device sounds very similar to use_device_ptr clause in > > OpenMP, which is allowed on #pragma omp target data construct and is > > implemented quite a bit differentl

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-11-02 Thread Jakub Jelinek
On Mon, Nov 02, 2015 at 06:33:39PM +, Julian Brown wrote: > As the author of the original patch, I have to say using the mapping > structures seems like a far better approach, but I've hit some trouble > with the details of adapting OpenACC to use that method. > > Firstly, on trunk at least, u

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-11-02 Thread Julian Brown
On Mon, 26 Oct 2015 19:34:22 +0100 Jakub Jelinek wrote: > Your use_device sounds very similar to use_device_ptr clause in > OpenMP, which is allowed on #pragma omp target data construct and is > implemented quite a bit differently from this; it is unclear if the > OpenACC standard requires this k

Re: Re: [Bulk] [OpenACC 0/7] host_data construct

2015-10-27 Thread Cesar Philippidis
On 10/26/2015 11:34 AM, Jakub Jelinek wrote: > On Fri, Oct 23, 2015 at 10:51:42AM -0500, James Norris wrote: >> @@ -12942,6 +12961,7 @@ c_finish_omp_clauses (tree clauses, bool is_omp, >> bool declare_simd) >> case OMP_CLAUSE_GANG: >> case OMP_CLAUSE_WORKER: >> case OMP_CLAUSE_VECTO

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-10-26 Thread Jakub Jelinek
On Fri, Oct 23, 2015 at 10:51:42AM -0500, James Norris wrote: > @@ -12942,6 +12961,7 @@ c_finish_omp_clauses (tree clauses, bool is_omp, bool > declare_simd) > case OMP_CLAUSE_GANG: > case OMP_CLAUSE_WORKER: > case OMP_CLAUSE_VECTOR: > + case OMP_CLAUSE_USE_DEVICE: >

Re: [Bulk] [OpenACC 0/7] host_data construct

2015-10-23 Thread James Norris
Hi, This a re-posting of the original note incorporating the suggestions from Joseph and Nathan (thank you). This patch adds the processing of OpenACC host_data construct in C and C++. (Note: Support in Fortran is already in trunk.) The patch also adds the required support in the mid

Re: [OpenACC 0/7] host_data construct

2015-10-22 Thread James Norris
To all, On 10/22/2015 03:36 PM, Joseph Myers wrote: I think this patch is small enough, and the pieces insufficiently self-contained, that splitting it up rather than posting as one patch just makes it harder to understand. My strong preference is that the same patch that introduces a feature s

Re: [OpenACC 0/7] host_data construct

2015-10-22 Thread Joseph Myers
I think this patch is small enough, and the pieces insufficiently self-contained, that splitting it up rather than posting as one patch just makes it harder to understand. My strong preference is that the same patch that introduces a feature should also add the testcases for that feature, for

[OpenACC 0/7] host_data construct

2015-10-22 Thread James Norris
Hi! This patch series adds the handling of OpenACC host_data construct in the C and C++ front-ends, gimple, and supporting functions in libgomp. Commentary on the changes is included in each individual patch. All of the code is in the gomp-4_0-branch. Regtested on x86_64