[Openmp-dev] Libomptarget fatal error 1: failure of target construct while offloading is mandatory

Siegmar Gross via Openmp-dev openmp-dev at lists.llvm.org
Mon Oct 1 03:26:53 PDT 2018


Hi,

today I've installed llvm-trunk. Unfortunately, I get an error for one of my
programs.


loki introduction 110 clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda 
dot_prod_accelerator_OpenMP.c
loki introduction 111 a.out
Number of processors:     24
Number of devices:        1
Default device:           0
Is initial device:        1
Libomptarget fatal error 1: failure of target construct while offloading is 
mandatory

loki introduction 112 setenv OMP_DEFAULT_DEVICE 1
loki introduction 113 a.out
Libomptarget fatal error 1: failure of target construct while offloading is 
mandatory

loki introduction 114 clang -v
clang version 8.0.0 (trunk 343447)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-trunk/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda-9.0, version 9.0
loki introduction 115



The program works fine with llvm-7.0.0.

loki introduction 125 clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda 
dot_prod_accelerator_OpenMP.c
loki introduction 126 a.out
Number of processors:     24
Number of devices:        1
Default device:           0
Is initial device:        1
sum = 6.000000e+08

loki introduction 127 setenv OMP_DEFAULT_DEVICE 1
loki introduction 128 a.out
Number of processors:     24
Number of devices:        1
Default device:           1
Is initial device:        1
sum = 6.000000e+08

loki introduction 129 clang -v
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-7.0.0/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda-9.0, version 9.0
loki introduction 130


Hopefully somebody can fix the problem. Do you need anything else to locate the 
error? Thank you very much for any help in advance.


Kind regards

Siegmar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dot_prod_accelerator_OpenMP.c
Type: text/x-csrc
Size: 1999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20181001/7c977262/attachment.c>


More information about the Openmp-dev mailing list