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

Joachim Protze via Openmp-dev openmp-dev at lists.llvm.org
Mon Oct 1 04:21:59 PDT 2018


Hi Siegmar,

In addition to the explanation by George:

after 7.0 release, the 5.0 workflow for OMP_TARGET_OFFLOAD was fixed.
In 7.0 release, if execution on the device fails for whatever reason 
(signal, device is used exclusively by another user, ...) the target 
region is executed by the host device.

Now, if an error occurs, you will get an error and execution aborts.

Best
Joachim


On 10/01/2018 12:26 PM, Siegmar Gross via Openmp-dev wrote:
> 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
> 
> 
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
> 



More information about the Openmp-dev mailing list