Hello World Design Example Error (-1001)
I'm trying to run the hello world example, but when attempting to run the host executable from the hello world directory using the command:
CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/hostI see the following error message:
ERROR: UNRECOGNIZED ERROR CODE (-1001)
Location: ../common/src/AOCLUtils/opencl.cpp:297
Query for number of platforms failedSteps to Reproduce
After installing Intel Quartus Pro, I followed the steps in the documentation below, starting from "Installing a custom FPGA" board for a linux machine.
I skipped the Enabling Backwards Compatibility section and went to the Verifying Host Runtime Functionality via Emulation section.
I set QUARTUS_ROOTDIR_OVERRIDE to where quartus pro was installed to
[patrickjang@localhost hello_world]$ echo $QUARTUS_ROOTDIR_OVERRIDE
/home/patrickjang/intelFPGA_pro/18.1/quartusAs well as LD_LIBRARY_PATH
[patrickjang@localhost hello_world]$ echo $LD_LIBRARY_PATH
/home/patrickjang/intelFPGA_lite/18.1/hls/host/linux64/lib/:/home/patrickjang/intelFPGA_pro/18.1/hld/host/linux64/lib:/home/patrickjang/intelFPGA_pro/18.1/hld/board/nalla_pcie_hostch/linux64/lib:/home/patrickjang/intelFPGA_pro/18.1/hld/host/linux64/lib:/home/patrickjang/intelFPGA_pro/18.1/hld/board/nalla_pcie_hostch/linux64/libDownloaded the Hello World example project for linux and entered the directory
Compiled a kernel for emulation
[patrickjang@localhost hello_world]$ aoc -march=emulator -v device/hello_world.cl -o bin/hello_world.aocx
aoc: Environment checks are completed successfully.
aoc: Cached files in /var/tmp/aocl/patrickjang may be used to reduce compilation time
You are now compiling the full flow!!
aoc: Selected default target board p385a_mac_hostch_ax115
aoc: Running OpenCL parser....
aoc: OpenCL parser completed successfully.
aoc: Linking Object files....
aoc: Compiling for Emulation ....
aoc: Emulator Compilation completed successfully.
Emulator flow is successful.
To execute emulated kernel, invoke host with
env CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 <host_program>
For multi device emulations replace the 1 with the number of devices you wish to emulateI then built the host application using the make command.
Heres what's in my bin directory:
[patrickjang@localhost hello_world]$ ls bin
hello_world hello_world.32130.temp hello_world.aocr host
hello_world.32080.temp hello_world.aoco hello_world.aocx
Next, I run "aocl linkflags" but am unsure with what to do with this information. Here's the output.
[patrickjang@localhost hello_world]$ aocl linkflags
-L/home/patrickjang/intelFPGA_pro/18.1/hld/host/linux64/lib -lOpenCLFinally I run "env CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host, which shows the aforementioned error message below:
[patrickjang@localhost hello_world]$ env CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host
ERROR: UNRECOGNIZED ERROR CODE (-1001)
Location: ../common/src/AOCLUtils/opencl.cpp:297
Query for number of platforms failed
Here's my aocl list-devices and diagnosis output (the diagnose all doesn't return anything)
[patrickjang@localhost hello_world]$ aocl list-devices
--------------------------------------------------------------------
Warning:
No devices attached for package:
/home/patrickjang/intelFPGA_pro/18.1/hld/board/nalla_pcie_hostch
--------------------------------------------------------------------
[patrickjang@localhost hello_world]$ aocl diagnose allHere's how I setup my environment variables in my ~/.bashrc file
PATH=$PATH:$HOME/bin
export QUARTUS_ROOTDIR="/home/patrickjang/intelFPGA_pro/18.1/quartus"
export QSYS_ROOTDIR="/home/patrickjang/intelFPGA_pro/18.1/qsys/bin"
export INTELFPGAOCLSDKROOT="/home/patrickjang/intelFPGA_pro/18.1/hld"
export AOCL_BOARD_PACKAGE_ROOT=${INTELFPGAOCLSDKROOT}/board/nalla_pcie_hostch
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INTELFPGAOCLSDKROOT/host/linux64/lib:$AOCL_BOARD_PACKAGE_ROOT/linux64/lib
export PATH=$PATH:$INTELFPGAOCLSDKROOT/bin:$QUARTUS_ROOTDIR/bin:$QUARTUS_ROOTDIR/sopc_builder/bin
export QUARTUS_ROOTDIR_OVERRIDE="/home/patrickjang/intelFPGA_pro/18.1/quartus"Please let me know if there are any other details I can provide. Any help would be greatly appreciated. Thanks!