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

George Rokos via Openmp-dev openmp-dev at lists.llvm.org
Mon Oct 1 04:19:17 PDT 2018


Hi Siegmar,

Apparently your application fails to offload to the GPU. And because offloading is mandatory (that's the default behavior) the library terminates the application.

Can you compile libomptarget in debug mode and run the app with LIBOMPTARGET_DEBUG=1 to see the debug output? That will help us identify the problem.

George

________________________________
From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> on behalf of Siegmar Gross via Openmp-dev <openmp-dev at lists.llvm.org>
Sent: 01 October 2018 13:26
To: llvm-openmp-dev
Subject: [Openmp-dev] Libomptarget fatal error 1: failure of target construct while offloading is mandatory

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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20181001/2de9b95b/attachment-0001.html>


More information about the Openmp-dev mailing list