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,
Can you try the command as below:
CL_CONFIG_CPU_EMULATE_DEVICES=1 bin/host
If the problem still persist, please tell me as well.
Thanks
- JGoer1
New Contributor
Hi Mylee,
Apologies for the delayed response. I realized I was on an incompatible version of ubuntu, and have since install 16.04.
However, after following the getting started pdf, I get a coredump from the hello world example
$ bin/host 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 = 16722680832 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 = 4180670208 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 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped)Apologies for all the questions!
- JGoer1
New Contributor
I just attempted to sanity check something, and recompiled both the aocx and the host binary, and I'm now getting the following output.
$ ./host 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 = 16722680832 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 = 4180670208 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
- MVALV2
New Contributor
Hello,
I'm having the exact same issue. Where you able to fix this?
Thanks,
Esteban VAlverde
- JGoer1
New Contributor
The issue I had was I was on the wrong version of ubuntu. the fpga opencl sdk only support 16.04 and 14.04. The installation went smoothly after that, and now I'm getting a core dump in a hello world example.
- MEIYAN_L_Intel
Frequent Contributor
Hi,
I would like to confirm the latest problem is regarding to the ERROR: CL_INVALID_BINARY or Aborted (core dumped)?
Thanks
- MEIYAN_L_Intel
Frequent Contributor
Hi,
Just to confirm with you that do you have setup the Intel Arria 10GX Development KIt as the document https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an807.pdf ?
Thanks
- JGoer1
New Contributor
I'm not looking to run on hardware right now, just get the emulator going. Getting a development kit is in future plans once I can get the SDK (namely the emulator) working. :) I did a aocl install with the provided a10_ref directory, otherwise I have done nothing with boards.
Thanks
- MEIYAN_L_Intel
Frequent Contributor
Hi,
It is the initialization and environment setup problem.
I will need some time to test on the steps as in OpenCL Getting Started Guide.
Thanks
- JGoer1
New Contributor
Thank you so much for all of your time! Please let me know if I can provide any additional information you need. If there is some sort of live chat mechanism that makes this easier to get information from me faster, please let me know, and I'd be more than happy to accommodate a time to be available.
- JGoer1
New Contributor
Hi Mylee,
Is a licence for System Studio required to get this working? It looks like I didn't receive a licence for it, and going through the install steps notice that the intel "c compiler" won't work without it.
Thanks
- JGoer1
New Contributor
It appears to work as long as the -legacy-emulator option is specified. I can work with this for now, but if possible, I would like to use the default emulator.
Thanks again for all your help!
- MEIYAN_L_Intel
Frequent Contributor
Hi,
Sorry for late reply.
I am still looking into it and try to duplicate the error.
Thanks
- MEIYAN_L_Intel
Frequent Contributor
Hi,
I am sorry for the late reply.
According to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_started.pdf in Chapter 3.3, you set the environment variables transiently.
Below is the script I had used to compile hello_world example with opencl offline compiler:
export AOCL_BOARD_PACKAGE_ROOT=<opencl install path>/board/a10_ref
cd $INTELFPGAOCLSDKROOT
source init_opencl.sh
cd <hello_world example path >/hello_world
aoc -march=emulator -v device/hello_world.cl -o bin/hello_world.aocx
cd hello_world && make
CL_CONFIG_CPU_EMULATE_DEVICES=1 bin/host -n=10000
Can you try the command?
Thanks
- JGoer1
New Contributor
Hi Mylee,
I tried your commands, and I get the following output
$ CL_CONFIG_CPU_EMULATE_DEVICES=1 bin/host -n=100000 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 failedWhen I try it with $ CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host -n=100000 I get the following output:
$ CL_CONTEXT_EMULATOR_DEVICE_INTELFPGA=1 bin/host -n=100000 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 = 16722758656 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 = 4180689664 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 binaryThanks again for all your help!
- MEIYAN_L_Intel
Frequent Contributor
Hi,
Could you provide me the environment variable for further investigate?
Thanks