Forum Discussion
RTL opencl Run time errors
Hi.
Compiling RTL opencl example1,
1.compiling host code (via make file) is completed
2. while Running (host executable :host ) get the following error
Querying device for info:
========================
CL_DEVICE_NAME =
CL_DEVICE_VENDOR =
CL_DEVICE_VENDOR_ID = 0
CL_DRIVER_VERSION =
CL_DEVICE_ADDRESS_BITS = 64
CL_DEVICE_AVAILABLE = true
CL_DEVICE_ENDIAN_LITTLE = true
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0
CL_DEVICE_GLOBAL_MEM_SIZE = 0
CL_DEVICE_IMAGE_SUPPORT = false
CL_DEVICE_LOCAL_MEM_SIZE = 0
CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000
CL_DEVICE_MAX_COMPUTE_UNITS = 1
CL_DEVICE_MAX_CONSTANT_ARGS = 8
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 8
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3
CL_DEVICE_MEM_BASE_ADDR_ALIGN = 8192
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0
Command queue out of order? = false
Command queue profiling enabled? = true
Context callback: Could not open devices
ERROR: CL_DEVICE_NOT_AVAILABLE
Location: host/src/main.cpp:226
Failed to create context
What is the reason that device is not found?
Thank you!
17 Replies
- HRZ
Frequent Contributor
Have you set up your board correctly? Does "aocl diagnose" pass? That error happens when the runtime cannot detect your board.
- Titanameda
New Contributor
I am just emulating , I believe that aocl diagnose is to test if the board is connected
- HRZ
Frequent Contributor
Then, are you passing "CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1" (for v16.1.2 and below) or "CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1" (for v17.0.0 and above) when running the binary compile for emulation?
- MEIYAN_L_Intel
Frequent Contributor
Hi,
From the message: CL_DEVICE_NAME =
CL_DEVICE_VENDOR =
CL_DEVICE_VENDOR_ID = 0
CL_DRIVER_VERSION =
It seems like the driver and device is not setup correctly.
You may need to follow the user guide as below to install driver and device:
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_started.pdf
Thanks
- Titanameda
New Contributor
SECTION 1:INSTALLING BSP
aocl install /opt/intelFPGA_pro/18.1/hld/board/a10_ref/
aocl install: Adding the board package /opt/intelFPGA_pro/18.1/hld/board/a10_ref to the list of installed pckages
aocl install: Setting up FCD
aocl install: Running install from /opt/intelFPGA_pro/18.1/hld/board/a10_ref/linux64/libexec
Looking for kernel source files in /lib/modules/4.15.0-70-generic/build
Using kernel source files from /lib/modules/4.15.0-70-generic/build
Building driver for BSP with name a10_ref
make: Entering directory '/usr/src/linux-headers-4.15.0-70-generic'
CC [M] /tmp/opencl_driver_L2D8cb/aclpci_queue.o
CC [M] /tmp/opencl_driver_L2D8cb/aclpci.o
CC [M] /tmp/opencl_driver_L2D8cb/aclpci_fileio.o
CC [M] /tmp/opencl_driver_L2D8cb/aclpci_dma.o
CC [M] /tmp/opencl_driver_L2D8cb/aclpci_pr.o
CC [M] /tmp/opencl_driver_L2D8cb/aclpci_cmd.o
LD [M] /tmp/opencl_driver_L2D8cb/aclpci_a10_ref_drv.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/opencl_driver_L2D8cb/aclpci_a10_ref_drv.mod.o
LD [M] /tmp/opencl_driver_L2D8cb/aclpci_a10_ref_drv.ko
make: Leaving directory '/usr/src/linux-headers-4.15.0-70-generic'
SECTION 2: Checking
here while checking , the following errors are obtained.
aocl diagnose
/opt/altera/aocl-pro-rte/aclrte-linux64/board/a10_1150_sg1/linux64/libexec/diagnose: error while loading shared libraries: libaltera_a10_1150_sg1_mmd.so: cannot open shared object file: No such file or directory
--------------------------------------------------------------------
Warning:
No devices attached for package:
/opt/intelFPGA_pro/18.1/hld/board/a10_ref
--------------------------------------------------------------------
Vendor: Intel(R) Corporation
Found no active device installed on the host machine.
Please make sure to:
1. Set the environment variable AOCL_BOARD_PACKAGE_ROOT to the correct board package.
2. Install the driver from the selected board package.
3. Properly install the device in the host machine.
4. Configure the device with a supported OpenCL design.
5. Reboot the machine if the PCI Express link failed.
DIAGNOSTIC_FAILED
--------------------------------------------------------------------
--------------------------------------------------------------------
Warning:
No devices attached for package:
/opt/altera/aocl-pro-rte/aclrte-linux64/board/a10_1150_sg1
--------------------------------------------------------------------
/opt/altera/aocl-pro-rte/aclrte-linux64/board/a10_1150_sg1/linux64/libexec/diagnose: error while loading shared libraries: libaltera_a10_1150_sg1_mmd.so: cannot open shared object file: No such file or directory
--------------------------------------------------------------------
--------------------------------------------------------------------
Warning:
No devices attached for package:
/home/tata/Sharath/hddlf_1150_sg1
--------------------------------------------------------------------
--------------------------------------------------------------------
Call "aocl diagnose <device-names>" to run diagnose for specified devices
Call "aocl diagnose all" to run diagnose for all devices
The same error, device not found exists .
- Titanameda
New Contributor
In the above aocl diagnose it is referring to some other BSP (libaltera_a10_1150_sg1_mmd.so) to find where should i edit it
These are the variables :
INTELFPGAOCLSDKROOT is set to /opt/intelFPGA_pro/18.1/hld. Using that.
Will use $QUARTUS_ROOTDIR_OVERRIDE= /opt/intelFPGA_pro/18.1/quartus to find Quartus
AOCL_BOARD_PACKAGE_ROOT is set to /opt/intelFPGA_pro/18.1/hld/board/a10_ref. Using that.
Adding /opt/intelFPGA_pro/18.1/hld/bin to PATH
Adding /opt/intelFPGA_pro/18.1/hld/host/linux64/lib to LD_LIBRARY_PATH
Adding /opt/intelFPGA_pro/18.1/hld/board/a10_ref/linux64/lib to LD_LIBRARY_PATH
- Titanameda
New Contributor
These are my variables in bash
####intel openvino###
export INTELFPGAOCLSDKROOT="/opt/intelFPGA_pro/18.1/hld"
export QSYS_ROOTDIR="/home/tata/intelFPGA_pro/18.1/qsys/bin"
export PATH=/home/tata/intelFPGA_pro/18.1/quartus/bin:$PATH
source /opt/intel/openvino/bin/setupvars.sh
export PATH=/opt/intelFPGA_pro/18.1/quartus/bin:$PATH
#opencl via openvino
export PATH=/opt/intelFPGA_pro/18.1/hld/bin:$PATH
source $INTELFPGAOCLSDKROOT/init_opencl.sh
i am using openvino BSPs as well!
so I believe , the paths are getting mixed
Thank You
- MEIYAN_L_Intel
Frequent Contributor
Hi,
From your comment above with the path provided, I saw that you are using the OpenVino toolkit. Just a confirmation, do you using OpenVino toolkit?
May I know what device you are using? This is because the Openvino software have different installation guide from OpenCl SDK software.
Thanks
- Titanameda
New Contributor
Hi,
Yes I am using openvino toolkit , I neeed to install both BSP (MUSTANG F100 and A10) and reference a10_ref
- MEIYAN_L_Intel
Frequent Contributor
Hi,
Can you try to install OpenVino for MUSTANG-F100-A10 by follow the link below:
https://docs.openvinotoolkit.org/latest/_docs_install_guides_VisionAcceleratorFPGA_Configure_2019R3.html
Do you have two board which is MUSTANG F100-A10 and Arria 10GX FPGA board as you had mentioned you want to install both BSP? Since these two board use different BSP and compiler software.
Thanks
- Titanameda
New Contributor
I have installed both BSP's , I have MUSTANG board connected to host via PCIe ,I need to emulate for both devices
This is what i get , but still when i run the host exe ,device is not found
cl_device not found
- Titanameda
New Contributor
Hi,
Both the mustang and a10_ref BSPs are installed ,I have mustang board alone , but I need to emulate on both boards.
so this is what is get.
The device is still not found