i came across this message on the list and found no better place to ask for help on a similar problem.
I am just experimenting offloading to x86_64 code from a x86_64 host system (ubuntu 18.04).
I have the packages:
- libomp-8-dev , containing among others :
I compiled the same offload.c program as the one given in the referenced mail.
My first try was :
$ clang-8 -g -fopenmp -fopenmp-targets=x86_64-pc-linux-gnu offload.c
which did produce a binary a.out, but this one fails with the cryptic error message:
$ export LD_LIBRARY_PATH=/usr/lib/llvm-8/lib/
Libomptarget fatal error 1: default offloading policy must switched to mandatory or disabled
Second try, after reading some of the hints was
$ clang-8 -g -I//usr/lib/llvm-8/include/ -L/usr/lib/llvm-8/lib -Xopenmp-target -march=x86-64 -fopenmp -fopenmp-targets=x86_64-pc-linux-gnu offload.c
which resulted in the same error.
By the way, i have no clue why -Xopenmp-target -march=x86-64 would be required, which quite seem redundant with -fopenmp_targets.
I went to see the source code at
but still can’t figure out what makes libomptarget unhappy.
In case this is related to ‘device’, i tested omp_get_default_device() which returns 1.
Any help would be appreciated.