Forum Discussion
Issues running Hello World openCL example missing libaltera_a10_ref_mmd.so
I'm trying to compile the hello_world openCL example. At first I was having an issue where it couldn't load the openCL platform. I got past that error by coping the $INTELFPGAOCLSDKROOT/Intel_FPGA_SSG_Emulator.icd file to /etc/OpenCL/vendors directory. Now when I go to run the host application, I get the following error:
bin/host: error while loading shared libraries: libaltera_a10_ref_mmd.so: cannot open shared object file: No such file or directory
I have updated my path to include $INTELFPGAOCLSDKROOT/bin, and set $LD_LIBRARY_PATH to $INTELFPGAOCLSDKROOT/host/linux64/lib.
Thanks for the help!
29 Replies
- MEIYAN_L_Intel
Frequent Contributor
Hi,
May I know the information as below:
- OS used
- Quartus Version and Edition
- FPGA used
There is an document with information that may help to you:
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_started.pdf
Thanks
- JGoer1
New Contributor
Hi there,
I am using Ubuntu, with Quartus 19.3 Pro, and right now I'm just trying to use the emulator and the a10_ref board.
- MEIYAN_L_Intel
Frequent Contributor
Hi,
It seems you have issues with PATH enviroment.
Can you ensure that you have set the PATH environment variable correctly. It can be something as below:
export PATH=$PATH:$INTELFPGAOCLSDKROOT/bin:$QUARTUS_DIR/bin
Please tell me as well if the problem still persists.
Thanks
- JGoer1
New Contributor
Hi there,
I updated my path, and attempted to recompile for the emulator, but I'm still getting "error while loading shared libraries: libaltera_a10_ref_mmd.so: cannot open shared object file: No such file or directory" when I attempt to run the host executable.
Thanks again for your help!
- JGoer1
New Contributor
Just wanted to follow up and see if there is anything else I could try? I have followed the pdf you have linked several times, but the result is always the same. It seems like I'm missing a pre-requisite piece of software, but going through the requirements section I think I have installed everything? The only other thing I can think of is that my library is in a non-standard place, and my LD_LIBRARY_PATH is wrong.
- MEIYAN_L_Intel
Frequent Contributor
Hi,
I had found some command that may help you as below:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ALTERAOCLSDKROOT/host/linux64/lib:$AOCL_BOARD_PACKAGE_ROOT/linux64/lib
Please tell me as well if the problem still persist.
Thanks
- JGoer1
New Contributor
Hi there,
Thank you for the reply! We are getting closer!
The next issue I have is I'm getting the following output:
$ bin/host -emulator Querying platform for info: ========================== CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM) CL_PLATFORM_VENDOR = Intel(R) Corporation CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.3 ERROR: CL_DEVICE_NOT_FOUND Location: ../common/src/AOCLUtils/opencl.cpp:356 Query for number of devices failedI have run the following commands to set up the number of devices:
$ export CL_CONFIG_CPU_EMULATE_DEVICES=1 host $ bin/host -emulatorI found this thread (https://forums.intel.com/s/question/0D50P00003yyS6sSAE/compile-and-run-issues-of-hello-world?language=en_US) talking about needing to set the CL_CONTEXT_EMULATOR_DEVICE_ALTERA variable, however I can't find anything in the install pdf about that variable (other than it's been renamed to CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA for rebranding purposes). Should I set that? if so, what should I set it to?
Thanks again for your time! I really appreciate it!
- JGoer1
New Contributor
Apologies, I see that is mentioned in the hello_world example docs. I am now getting the following issue:
$ bin/host -emulator Querying platform for info: ========================== CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM) CL_PLATFORM_VENDOR = Intel(R) Corporation CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.3 Querying device for info: ======================== CL_DEVICE_NAME = EmulatorDevice : Emulated Device CL_DEVICE_VENDOR = Intel(R) Corporation CL_DEVICE_VENDOR_ID = 4466 CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.3 CL_DRIVER_VERSION = 19.3 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 = 16719629312 CL_DEVICE_IMAGE_SUPPORT = false CL_DEVICE_LOCAL_MEM_SIZE = 16384 CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000 CL_DEVICE_MAX_COMPUTE_UNITS = 1 CL_DEVICE_MAX_CONSTANT_ARGS = 8 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 4179907328 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? = true Command queue profiling enabled? = true Using AOCX: hello_world.aocx Context callback: Malformed program binary: missing .acl.board section Context callback: kernel argument info is not available Context callback: Invalid binary ERROR: CL_INVALID_BINARY Location: ../common/src/AOCLUtils/opencl.cpp:392 Failed to create program with binary - MEIYAN_L_Intel
Frequent Contributor
Hi,
According to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_started.pdf for Quartus Prime Pro 19.3, there is an updated as stated: "Changed CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA to CL_CONFIG_CPU_EMULATE_DEVICES."
You can refer to Chapter 2.6.4 as link mentioned above for emulating your OpenCL Kernel.
Thanks
- JGoer1
New Contributor
Hi there,
I set CL_CONFIG_CPU_EMULATE_DEVICES, and I still get the following output.
$ bin/host -emulator Querying platform for info: ========================== CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(T$) CL_PLATFORM_VENDOR = Intel(R) Corporation CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK f$r OpenCL(TM), Version 19.3 Querying device for info: ======================== CL_DEVICE_NAME = EmulatorDevice : Emulated Devi$e CL_DEVICE_VENDOR = Intel(R) Corporation CL_DEVICE_VENDOR_ID = 4466 CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK f$r OpenCL(TM), Version 19.3 CL_DRIVER_VERSION = 19.3 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 = 16719629312 CL_DEVICE_IMAGE_SUPPORT = false CL_DEVICE_LOCAL_MEM_SIZE = 16384 CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000 CL_DEVICE_MAX_COMPUTE_UNITS = 1 CL_DEVICE_MAX_CONSTANT_ARGS = 8 CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 4179907328 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? = true Command queue profiling enabled? = true Using AOCX: hello_world.aocx Context callback: Malformed program binary: missing .acl.board section Context callback: kernel argument info is not available Context callback: Invalid binary ERROR: CL_INVALID_BINARY Location: ../common/src/AOCLUtils/opencl.cpp:392 Failed to create program with binaryJust to confirm, here is what I have CL_CONFIG_CPU_EMULATE_DEVICES set to:
$ echo $CL_CONFIG_CPU_EMULATE_DEVICES 1 bin/host