[llvm-bugs] [Bug 38464] New: Clang compilation error with math.h when using openmp offload
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 6 13:28:08 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38464
Bug ID: 38464
Summary: Clang compilation error with math.h when using openmp
offload
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: xw111luoye at gmail.com
CC: llvm-bugs at lists.llvm.org
I'm exploring the openmp offload feature of llvm+clang and hit some compiler
error. I built the master branch of llvm+clang+opemp with clang7.
Now when compiling miniQMC offload branch.
https://github.com/QMCPACK/miniqmc/tree/OMP_offload
mkdir build_clang_offload; cd build_clang_offload
cmake -DCMAKE_CXX_COMPILER="clang++" -DQMC_MPI=0 -DENABLE_OFFLOAD=1 ..
make
I got the following error
[ 2%] Building CXX object
src/CMakeFiles/qmcbase.dir/Particle/ParticleSet.cpp.o
cd /sandbox/opt/miniqmc/build_clang_offload/src &&
/sandbox/opt/llvm-clang/clang-offload/bin/clang++ -DADD_ -DH5_USE_16_API
-DHAVE_CONFIG_H -DINLINE_ALL=inline -DUSE_REAL_STRUCT_FACTOR
-Drestrict=__restrict__ -I/sandbox/opt/miniqmc/src
-I/sandbox/opt/miniqmc/build_clang_offload/src
--gcc-toolchain=/soft/apps/packages/gcc/gcc-6.2.0 -fopenmp
-fopenmp-targets=nvptx64-nvidia-cuda -fomit-frame-pointer -fstrict-aliasing
-D__forceinline=inline -Wno-deprecated -Wno-unused-value
-Wno-undefined-var-template -O3 -DNDEBUG -ffast-math -std=c++11 -o
CMakeFiles/qmcbase.dir/Particle/ParticleSet.cpp.o -c
/sandbox/opt/miniqmc/src/Particle/ParticleSet.cpp
In file included from /sandbox/opt/miniqmc/src/Particle/ParticleSet.cpp:32:
In file included from /sandbox/opt/miniqmc/src/Particle/ParticleSet.h:34:
In file included from /sandbox/opt/miniqmc/src/Utilities/Configuration.h:27:
In file included from
/soft/apps/packages/gcc/gcc-6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/complex:44:
In file included from
/soft/apps/packages/gcc/gcc-6.2.0/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../include/c++/6.2.0/cmath:45:
In file included from /usr/include/math.h:426:
/usr/include/x86_64-linux-gnu/bits/mathinline.h:131:43: error: invalid input
constraint 'x' in asm
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
^
/usr/include/x86_64-linux-gnu/bits/mathinline.h:143:43: error: invalid input
constraint 'x' in asm
__asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x));
Actually the code involved in this complication doesn't contain offload code at
all. If I simply remove -fopenmp-targets=nvptx64-nvidia-cuda, the compilation
goes through.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180806/e92ed27e/attachment.html>
More information about the llvm-bugs
mailing list