<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Siegmar,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Apparently your application fails to offload to the GPU. And because offloading is mandatory (that's the default behavior) the library terminates the application.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
George</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Openmp-dev <openmp-dev-bounces@lists.llvm.org> on behalf of Siegmar Gross via Openmp-dev <openmp-dev@lists.llvm.org><br>
<b>Sent:</b> 01 October 2018 13:26<br>
<b>To:</b> llvm-openmp-dev<br>
<b>Subject:</b> [Openmp-dev] Libomptarget fatal error 1: failure of target construct while offloading is mandatory</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
today I've installed llvm-trunk. Unfortunately, I get an error for one of my<br>
programs.<br>
<br>
<br>
loki introduction 110 clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda <br>
dot_prod_accelerator_OpenMP.c<br>
loki introduction 111 a.out<br>
Number of processors: 24<br>
Number of devices: 1<br>
Default device: 0<br>
Is initial device: 1<br>
Libomptarget fatal error 1: failure of target construct while offloading is <br>
mandatory<br>
<br>
loki introduction 112 setenv OMP_DEFAULT_DEVICE 1<br>
loki introduction 113 a.out<br>
Libomptarget fatal error 1: failure of target construct while offloading is <br>
mandatory<br>
<br>
loki introduction 114 clang -v<br>
clang version 8.0.0 (trunk 343447)<br>
Target: x86_64-unknown-linux-gnu<br>
Thread model: posix<br>
InstalledDir: /usr/local/llvm-trunk/bin<br>
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8<br>
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8<br>
Candidate multilib: .;@m64<br>
Candidate multilib: 32;@m32<br>
Selected multilib: .;@m64<br>
Found CUDA installation: /usr/local/cuda-9.0, version 9.0<br>
loki introduction 115<br>
<br>
<br>
<br>
The program works fine with llvm-7.0.0.<br>
<br>
loki introduction 125 clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda <br>
dot_prod_accelerator_OpenMP.c<br>
loki introduction 126 a.out<br>
Number of processors: 24<br>
Number of devices: 1<br>
Default device: 0<br>
Is initial device: 1<br>
sum = 6.000000e+08<br>
<br>
loki introduction 127 setenv OMP_DEFAULT_DEVICE 1<br>
loki introduction 128 a.out<br>
Number of processors: 24<br>
Number of devices: 1<br>
Default device: 1<br>
Is initial device: 1<br>
sum = 6.000000e+08<br>
<br>
loki introduction 129 clang -v<br>
clang version 7.0.0 (tags/RELEASE_700/final)<br>
Target: x86_64-unknown-linux-gnu<br>
Thread model: posix<br>
InstalledDir: /usr/local/llvm-7.0.0/bin<br>
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8<br>
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8<br>
Candidate multilib: .;@m64<br>
Candidate multilib: 32;@m32<br>
Selected multilib: .;@m64<br>
Found CUDA installation: /usr/local/cuda-9.0, version 9.0<br>
loki introduction 130<br>
<br>
<br>
Hopefully somebody can fix the problem. Do you need anything else to locate the <br>
error? Thank you very much for any help in advance.<br>
<br>
<br>
Kind regards<br>
<br>
Siegmar<br>
</div>
</span></font></div>
</body>
</html>