From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-o-3.desy.de (smtp-o-3.desy.de [131.169.56.156]) by sourceware.org (Postfix) with ESMTPS id C5DC83858416 for ; Wed, 12 Jan 2022 10:01:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C5DC83858416 Received: from smtp-buf-3.desy.de (smtp-buf-3.desy.de [131.169.56.166]) by smtp-o-3.desy.de (Postfix) with ESMTP id 3DBFD60864 for ; Wed, 12 Jan 2022 11:01:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp-o-3.desy.de 3DBFD60864 Received: from smtp-m-3.desy.de (smtp-m-3.desy.de [131.169.56.131]) by smtp-buf-3.desy.de (Postfix) with ESMTP id 3601FA0586; Wed, 12 Jan 2022 11:01:12 +0100 (CET) X-Virus-Scanned: amavisd-new at desy.de Received: from z-prx-5.desy.de (z-prx-5.desy.de [131.169.10.29]) by smtp-intra-1.desy.de (Postfix) with ESMTP id DDE1EC0177; Wed, 12 Jan 2022 11:01:11 +0100 (CET) Received: from z-prx-5.desy.de ([127.0.0.1]) by localhost (z-prx-5.desy.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zYCwU3rLv4m6; Wed, 12 Jan 2022 11:01:11 +0100 (CET) Received: from smtpclient.apple (cmspcx14975.desy.de [131.169.49.95]) by z-prx-5.desy.de (Postfix) with ESMTPSA id 86484E00B2; Wed, 12 Jan 2022 11:01:11 +0100 (CET) From: Mikel Mendizabal Message-Id: Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: GCC and OpenACC Date: Wed, 12 Jan 2022 11:01:10 +0100 In-Reply-To: Cc: GCC Development To: Richard Biener References: <1935E1B7-16F3-4545-A5A2-4AEE720E5C7A@desy.de> X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2022 10:01:16 -0000 Dear Richard, Thanks a lot for the fast response. Here I send you a self contained = example. I took it from openACC tutorial in [1]. I modified the code and = added a dummy vector of size 1, lines 140-160 in the attached file = (jsolvef_mikel.F90). The dummy vector (residual_v) is the array form of = the variable residual. If the reduction clause (line 142) is commented both residual and = residual_v give the same result. If in the reduction clause residual_v = is given a compilation error appears, that the reduction clause does not = support this variable datatype. In [2] I added the OpenACC 3.1 = documentation. In section 1.12 the changes from v2.6 to v2.7 are = described. More precisely, in line 612-613 the next is quoted: "Arrays, subarrays and composite variables are now allowed in reduction = clauses; see Sections 2.9.11 reduction clause and 2.5.14 reduction = clause.=E2=80=9D I hope I could explain myself properly! Thanks a lot :)=20 Mikel Mendizabal [1] = https://github.com/OpenACCUserGroup/openacc-users-group/blob/master/Contri= buted_Sample_Codes/Tutorial1/solver/jsolvef.F90 = =20 [2] = https://www.openacc.org/sites/default/files/inline-images/Specification/Op= enACC-3.1-final.pdf = =20 > On 11. Jan 2022, at 14:26, Richard Biener = wrote: >=20 > On Tue, Jan 11, 2022 at 1:52 PM Mikel Mendizabal via Gcc > > wrote: >>=20 >> Dear GCC developers, >>=20 >> In the past year we started the offload of our software to GPUs. We = decided to go with OpenACC. The program we are trying to offload is = Millepede2 (MP2), a tracker alignment software used to align the CMS = experiment tracker at the large hadron collider. >>=20 >> We are using gcc as our main compiler. However, we found a major = inconvenience with OpenACC 2.6, the REDUCTION clause does not accept = arrays. Thus, it not possible for us to parallelise our largest loops = due to array dependencies. We managed to offload MP2 for small datasets, = we worked around the reduction issue. Nonetheless, if our alignment = campaign is large the workarounds are not useful anymore. >>=20 >> I went thought the new versions of OpenACC and I found that v2.7 = accepts arrays for the REDUCTION clause. I was wondering if it is in = your plans to include a newer version of OpenACC for the next releases. >=20 > Can you produce a self-contained example with an array for the > REDUCTION clause that should be accepted with OpenACC v2.7? >=20 > Thanks, > Richard. >=20 >> Sincerely, >> Mikel Mendizabal