[Bug fortran/74600] New: [openacc] duplicate data map error

cesar at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 11 21:03:00 GMT 2016


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

            Bug ID: 74600
           Summary: [openacc] duplicate data map error
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: openacc
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cesar at gcc dot gnu.org
                CC: cesar at gcc dot gnu.org, tschwinge at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-linux-gnu, nvptx-none

Created attachment 39268
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39268&action=edit
duplicate-map.f90

The attached test case yields the following 'already mapped' error at runtime
when ACC_DEVICE_TYPE=nvidia:

libgomp: Trying to map into device [0x7ffe515d5ee0..0x7ffe515d5ee4) object when
[0x7ffe515d5ee0..0x7ffe515d5ef0) is already mapped

Looking at the omplower tree dump for program test I see 

 FRAME.1.FRAME_BASE.PARENT = 0B;
  try
    {
      D.3446 = 2.0e+0;
      FRAME.1.a = D.3446;
      {
        .omp_data_arr.4.FRAME.1 = &FRAME.1;
        .omp_data_arr.4.a = &FRAME.1.a;
        #pragma omp target oacc_parallel map(tofrom:FRAME.1) map(force_tofrom:a
[len: 4]) [child fn: MAIN__._omp_fn.0 (.omp_data_arr.4, .omp_data_sizes.5,
.omp_data_kinds.6)]
          {

After inspecting the hostaddrs passed to GOACC_parallel_keyed, both variable
'a' and FRAME.1 share the same address, hence the duplicate data mapping error.

This issue is present on at least gomp-4_0-branch with nvptx offloading. I
wasn't able to try trunk because it stopped building on nvptx as of Aug 11, so
I'll retest trunk once that problem has been resolved.


More information about the Gcc-bugs mailing list