public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jhdavis at udel dot edu" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-94290-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2020-03-23 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 18:47 jhdavis at udel dot edu [this message]
2020-03-27 19:32 ` [Bug libgomp/94290] " jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94290-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).