From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD1DC385B832; Mon, 23 Mar 2020 18:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD1DC385B832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584989235; bh=nSnuFfRp+t9M3XCPtb25HuyqHauPDPoRiVBaSXh9yH4=; h=From:To:Subject:Date:From; b=ncZUAQnxA4eTRKtLU8sH0xwIIvdF5K8NQsdoiuZBZpFTzxdBRCQFur2SZdaSVQriA KTo1kfB54DaNbImL6eQyBx6HyiB2CgJi7comqSqfNVogxHiXRCQE52SAEPzywtUpL+ kJ/zqKodLq+KCe4K7Fqq3UoP3nwSxw/wlq6xuqXA= From: "jhdavis at udel dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/94290] New: [gfortran] OpenMP target teams distribute default firstprivate causes failure to map back values from device Date: Mon, 23 Mar 2020 18:47:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 9.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jhdavis at udel dot edu 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 bug_severity priority component assigned_to reporter cc target_milestone 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: Mon, 23 Mar 2020 18:47:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94290 Bug ID: 94290 Summary: [gfortran] OpenMP target teams distribute default firstprivate causes failure to map back values from device Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: jhdavis at udel dot edu CC: jakub at gcc dot gnu.org Target Milestone: --- Created attachment 48099 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48099&action=3Dedit Target teams distribute default(firstprivate) reproducible Hello, This bug report is from the SOLLVE team regarding default(firstprivate) in = an offloading construct. --- SUMMARY --- On a target teams distribute clause the default(firstprivate) clause we are seeing a failure to map back changes made on the device. In the attached reproducible we test both the 'private' and 'first' aspects of the clause f= or both scalars and arrays on the device and then check the results on the hos= t. Changing the default(firstprivate) in both parts of the test to firstprivate(privatized, privatized_array) causes the test to work as expec= ted. The version of the test in our suite is availible here: https://github.com/SOLLVE/sollve_vv/blob/d031050b40edf3cd261219d649e932b4f4= 743ff6/tests/4.5/target_teams_distribute/test_target_teams_distribute_defau= lt_firstprivate.F90 --- DETAILS --- gfortran version: 9.2.0 System: x86_64-pc-linux-gnu (Summit) Config options:=20 ../gcc9.2/configure --enable-offload-targets=3Dnvptx-none --with-cuda-driver-include=3D/software/apps/cuda/9.2//include --with-cuda-driver-lib=3D/software/apps/cuda/9.2//lib64 --disable-bootstrap --disable-multilib --enable-languages=3Dc,c++,fortran,lto --prefix=3D/software/apps/gcc/9.2 No compiler output. Runtime output: test_firstprivate_private gave 1024 expected 0 test_firstprivate_first gave 1024 expected 0 Command line to trigger bug: gfortran -fopenmp -ffree-line-length-none default_firstprivate_bug.F90 = -o default_firstprivate_bug.F90.o ./default_firstprivate_bug.F90.o Best, Josh Davis=