Open Yu-Zhewen opened 5 years ago
I solved this by deleting the local CL/cl.h
which was being used in favour of my installed system version (Ubuntu 18.04).
Whoops -- moved to OpenCL 1.2 features without updating the bindings. New version of CL/cl.hpp
incoming... please try again and let me know if this fixes the issue.
Thank you. The problem is solved.
Hello,
on DoC lab machines, this isn't sufficient to solve the issue. opencl.h
is missing and one of the previous issues (#74) suggests adding -I opencl_sdk/include
flag to solve it. However, those file are still not updated.
I have solved this by adding KhronosGroup/OpenCL-Headers as a git submodule and specifying the API version with #define CL_TARGET_OPENCL_VERSION 120
and adding the appropriate -I
flag.
It works for me, but might be worth updating the opencl_sdk/include
as well.
Thanks -- I've done the same.
To get test_opencl to compile (I kept getting the "underfined reference to ..." errors), I had to copy the OpenCL.lib from the OpenCl folder in my C:\Intel directory to the project directory (opencl_sdk\lib\windows\x86_64). I also didn't need the new files that were committed to opencl_sdk\include. This was all after I installed the Intel SDK for OpenCl (In addition to adding to the makefile: LDFLAGS += -Iopencl_sdk/include -Lopencl_sdk/lib/windows/x86_64 LDLIBS += -lOpenCL ) Using 64-bit windows 10, Intel(R) HD Graphics 620
Using macOS Mojave v10.14.2, I'm having trouble with making the test_opencl file as well. When I do c++ -I include -W -Wall -std=c++11 -O3 -o bin/test_opencl src/test_opencl.cpp -lOpenCL
it says
ld: library not found for -lOpenCL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/test_opencl] Error 1
Not sure how to solve this.
@szetyng You should swap -lOpenCL
with -framework OpenCL
on Mac.
You can add -DCL_SILENCE_DEPRECATION
as well to ignore all the deprecation warnings.
These kind of environment-specific headaches are inevitable, and unfortunately I can't give you definitive answers. Things should work properly on Ubuntu and related Linux installs, since that's what I test them on, but for Windows and Mac OS it's a different story....
@mantzouj: You shouldn't have to copy anything. You should be able to change the build scripts to include/link against the relevant directories (wherever they happen to be on your system) when g++
is called.
OS: ubuntu16.04, GPU: Nvidia
make test_opencl will give me following errors
It is related to the commit 'Imported updates for 2018/2019'.
After I changed back this part of code, every thing is fine. The program can be built and executed.