Forum Discussion
Altera_Forum
Honored Contributor
9 years agoGot CL_INVALID_BINARY error when emulated HelloWorld example on Windows
I followed the "aocl_getting_started.pdf" instruction to implement the hello_world example on Window. But I got error message about CL_INVALID_BINARY when I tried to run the emulator.
The steps that I've done are as following: 1. "%ALTERAOCLSDKROOT%\init_opencl.bat", set environment. 2. "aoc -march=emulator -v --board s5_ref device/hello_world.cl -o bin/hello_world.aocx", built hello_world.aocx file successlly. 3. "set CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 host.exe" 4. Built host program(host.exe) from Visual Studio 2010 successlly. 5. Under folder hello_world\bin. Run host.exe on cmd, and get the error message as the image in the attachment. Using AOCX: hello_world.aocx Context callback: Invalid binary. ERROR: CL_INVALID_BINARY Location: ..\common\src\AOCLUtils\opencl.cpp:392 Failed to create program with binary Is there any step I missed? Please advice. Thank you.12 Replies
- Altera_Forum
Honored Contributor
Hi,
Could you build a Hello world kernel with out emulator mode, and do an aocl program, then try to rerun the host ? Thanks, Regards, CloseCL (This message was posted on behalf of Intel Corporation) - SOUMYA_D_Intel
New Contributor
Can somebody tell me how to link the host application with the OpenCL host runtime libraries using aocl linkflags?
The guide only tells to do it, but didn't point out how to link it..
This is the output after running aocl linkflags:
C:\intelFPGA_pro\19.1\hld\examples_aoc\hello_world> aocl linkflags
/libpath:C:/intelFPGA_pro/19.1/hld/host/windows64/lib OpenCL.lib