From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 96F8A393A423 for ; Wed, 12 Jan 2022 11:53:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96F8A393A423 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: CkjGeLVrRMibbhNqQwCTHNAWZ1yQuagsfG2MAz3TgmUU8qVqN8PeBp36by3vuGWyh5uSQnpMR/ F3W8QQWJVZ/jHAhCl67UbVKXDulCcBIetGSdlNPBxi6Nsbbxs0nkUAG2G9grRfAySIg0hapB54 tpwQ6avadnN8CpSQjw70nfgoTzYRGODOWFbbwp2ijRyc4kkgfPh6Sb7dxdpoA1ChOYXAalOEe0 f/ffplTu3GFRBDbB761zo8yQIFZjFZKJz+HTRwY5CdDvlqjHayQyqrhu6z3eOpzSLEp35XFmUJ yfGHq26Pao0Bp1GzJ9NfeRCq X-IronPort-AV: E=Sophos;i="5.88,282,1635235200"; d="scan'208";a="73194799" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 12 Jan 2022 03:53:52 -0800 IronPort-SDR: RsQon/VVLp+DUgVZVd7EPMkiXpYaLOUJNdV9M/nU+gFCMnHmro5vvZx41nLhbMwDIoa+Jl4M7L zo0pRBxc/tMmAREZb2JtfH7yJQEzHzVXR7jh8/O2VHqmhLT3PQiUKbJ5mv7Kef1Rb7gdbKCiY7 A3J97xEyOPVslnLfg+TfhfezwqGHB2JkejXxpY2yldtv2zO0zN5vT6/dKkB1zfuOh5/DtNOuSr AF2YSL6Z3AmQfPpR+oz9gJkIBdvak2WfQJvuBI+YpJWsWB6HviKP1jHwVAejHZANvZQ6iLGToR qv0= Message-ID: <7c6e88db-5b0b-7916-a836-407570778fb5@codesourcery.com> Date: Wed, 12 Jan 2022 12:53:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: GCC and OpenACC Content-Language: en-US To: Mikel Mendizabal , Thomas Schwinge CC: GCC Development , Richard Biener References: <1935E1B7-16F3-4545-A5A2-4AEE720E5C7A@desy.de> From: Tobias Burnus In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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 11:53:55 -0000 Dear Mikel, thanks for the example. I have now filled a tracking issue at https://gcc.gnu.org/PR103988. Currently, GCC only supports OpenACC 2.6. As GCC mainline is in feature-freeze Stage 3, this feature will surely miss GCC 12, unfortunately. At the moment, the OpenACC work is mostly focusing on behind-the-scene changes (like corner cases, performance, nvptx/GCN improvements etc.). However, support for OpenACC 2.7 (and later) is planned.* Thanks for the report, Tobias *Planned by us, that is. GCC is an open-source project with contributors from several companies and also many individual developers (spare time/hobby or paid), each with their own schedule and topical focus. Besides waiting, one option would be that you implement the reduction feature yourself in GCC =E2=80=93 or find someone who does this for you, pa= id or not. (I think it should also be also suitable for Google Summer of Code.) The array part should be relatively simple as GCC supports it already for OpenMP; the structure part is a bit more work as piggybacking is not possible but should be also not that complicated, I think. On 12.01.22 11:01, Mikel Mendizabal via Gcc wrote: > Dear Richard, > > Thanks a lot for the fast response. Here I send you a self contained exam= ple. 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 res= idual. > > If the reduction clause (line 142) is commented both residual and residua= l_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 c= lauses; 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 :) > > Mikel Mendizabal > > > [1] https://github.com/OpenACCUserGroup/openacc-users-group/blob/master/C= ontributed_Sample_Codes/Tutorial1/solver/jsolvef.F90 > [2] https://www.openacc.org/sites/default/files/inline-images/Specificati= on/OpenACC-3.1-final.pdf > > > >> On 11. Jan 2022, at 14:26, Richard Biener w= rote: >> >> On Tue, Jan 11, 2022 at 1:52 PM Mikel Mendizabal via Gcc >> > wrote: >>> Dear GCC developers, >>> >>> In the past year we started the offload of our software to GPUs. We dec= ided to go with OpenACC. The program we are trying to offload is Millepede2= (MP2), a tracker alignment software used to align the CMS experiment trac= ker at the large hadron collider. >>> >>> We are using gcc as our main compiler. However, we found a major inconv= enience 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 depe= ndencies. We managed to offload MP2 for small datasets, we worked around th= e reduction issue. Nonetheless, if our alignment campaign is large the work= arounds are not useful anymore. >>> >>> I went thought the new versions of OpenACC and I found that v2.7 accept= s arrays for the REDUCTION clause. I was wondering if it is in your plans t= o include a newer version of OpenACC for the next releases. >> Can you produce a self-contained example with an array for the >> REDUCTION clause that should be accepted with OpenACC v2.7? >> >> Thanks, >> Richard. >> >>> Sincerely, >>> Mikel Mendizabal ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955