public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/94290] New: [gfortran] OpenMP target teams distribute default firstprivate causes failure to map back values from device
@ 2020-03-23 18:47 jhdavis at udel dot edu
  2020-03-27 19:32 ` [Bug libgomp/94290] " jakub at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jhdavis at udel dot edu @ 2020-03-23 18:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94290

            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=48099&action=edit
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 for
both scalars and arrays on the device and then check the results on the host.
Changing the default(firstprivate) in both parts of the test to
firstprivate(privatized, privatized_array) causes the test to work as expected.
The version of the test in our suite is availible here:
https://github.com/SOLLVE/sollve_vv/blob/d031050b40edf3cd261219d649e932b4f4743ff6/tests/4.5/target_teams_distribute/test_target_teams_distribute_default_firstprivate.F90

--- DETAILS ---
gfortran version: 9.2.0

System: x86_64-pc-linux-gnu (Summit)

Config options: 
    ../gcc9.2/configure --enable-offload-targets=nvptx-none
--with-cuda-driver-include=/software/apps/cuda/9.2//include
--with-cuda-driver-lib=/software/apps/cuda/9.2//lib64 --disable-bootstrap
--disable-multilib --enable-languages=c,c++,fortran,lto
--prefix=/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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-27 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 18:47 [Bug libgomp/94290] New: [gfortran] OpenMP target teams distribute default firstprivate causes failure to map back values from device jhdavis at udel dot edu
2020-03-27 19:32 ` [Bug libgomp/94290] " jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).