[llvm-bugs] [Bug 34582] New: [OpenMP 4.5] Array segment mapping to device with default length (e.g. map(array[1:]) ) fails at runtime

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 12 13:14:22 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34582

            Bug ID: 34582
           Summary: [OpenMP 4.5] Array segment mapping to device with
                    default length (e.g. map(array[1:]) ) fails at runtime
           Product: OpenMP
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: unassignedclangbugs at nondot.org
          Reporter: josem at udel.edu
                CC: llvm-bugs at lists.llvm.org

Created attachment 19149
  --> https://bugs.llvm.org/attachment.cgi?id=19149&action=edit
Reproducible for array_segment bug

Dear LLVM community,

--- SUMMARY:
This bug affects the OpenMP 4.5 support in LLVM when mapping an array section
with no explicit lenght. 

--- MORE INFORMATION:
When trying to map an array section that uses the default length value ([1:]),
but a lower-bound that is different than 0, A runtime error occurs.

According to the OpenMP 4.5 specifications, section 2.4, page 45, line 13: 

"When the length is absent, it defaults to the size of the array dimension
minus the lower-bound."

I am attaching a sample code that can be use to reproduce this error. 

The error happens when using:

#pragma omp target data map(from: a1d[1:])

backtrace info shows the error comming from 
#6  0x00003fffb7ef01f0 in __tgt_target () from (...)/omprtl/lib/libxlsmp.so.1
#7  0x0000000010000efc in fail_on_map () at (...)array_segment_map.c:28
#8  0x000000001000119c in main () at (...)array_segment_map.c:56

--- COMPILATION:
clang  -std=c99 -fopenmp -fopenmp-targets=nvptx64-nvida-cuda
array_segment_map.c -o array_segment_map.c.o

--- MACHINE
I tested this in a 64 bit system. 
clang version 3.8.0 (ibmgithub:/CORAL-LLVM-Compilers/clang.git
6dec6f47d3868e3c8bf6e9e19a217cb2b459d3d8)
(ibmgithub:/CORAL-LLVM-Compilers/llvm.git
b1d578319dbe65eb1e654c6b4e3d05dfcaa087a6)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
- Red Hat Enterprise Linux Server 7.3 - CentOS release 7
- POWER8NVL ppc64le
- NVIDIA Tesla P100 GPU

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170912/ac18e35d/attachment-0001.html>


More information about the llvm-bugs mailing list