From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 58F87393D00B; Wed, 28 Apr 2021 15:36:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58F87393D00B From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100321] New: [OpenMP][nvptx] (Con't) Reduction fails with optimization and 'loop'/'for simd' but not with 'for' Date: Wed, 28 Apr 2021 15:36:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: openmp, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 15:36:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100321 Bug ID: 100321 Summary: [OpenMP][nvptx] (Con't) Reduction fails with optimization and 'loop'/'for simd' but not with 'for' Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: openmp, wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: vries at gcc dot gnu.org Target Milestone: --- Target: nvptx-none Created attachment 50703 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50703&action=3Dedit target_parallel_for_simd.cpp - compile with g++ -fopenmp -O1 (and nvptx offloading) Similar to PR target/100232=20 I had hoped that the posted patch does solves this issue as well, but it do= es not :-/ [ https://gcc.gnu.org/pipermail/gcc-patches/2021-April/569038.html ] (However, it does solve the two sollve_vv issue, I mentioned in PR100232 :-) Thanks!) Namely, https://github.com/TApplencourt/OvO 's test_src/cpp/hierarchical_parallelism/reduction_add-complex_double/target_p= arallel_for_simd.cpp (also attached) works on the host and AMD GCN, but with nvptx: g++ -fopenmp -O1 target_parallel_for_simd.cpp -foffload=3D-latomic it fails as Expected: (32768,0) Got: (1024,0) (with exist status code 112) The -O1 is needed due to the missing .alias. When removing the 'simd' from #pragma omp target parallel for simd map(tofrom: counter_N0) reduction(= +: counter_N0) it does work.=