Intel® FPGA Software Installation & Licensing
Installation and Licensing that’s includes Intel Quartus® Prime software, ModelSim* - Intel FPGA Edition software, Nios® II Embedded Design Suite on Windows or Linux operating systems.
1152 Discussions

Issues running Hello World openCL example missing libaltera_a10_ref_mmd.so

JGoer1
Beginner
3,336 Views

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!

0 Kudos
29 Replies
JGoer1
Beginner
700 Views

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

0 Kudos
MEIYAN_L_Intel
Employee
700 Views

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

0 Kudos
JGoer1
Beginner
700 Views

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.

0 Kudos
JGoer1
Beginner
700 Views

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

0 Kudos
JGoer1
Beginner
700 Views

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!

0 Kudos
MEIYAN_L_Intel
Employee
700 Views

Hi,

Sorry for late reply.

I am still looking into it and try to duplicate the error.

Thanks

0 Kudos
MEIYAN_L_Intel
Employee
700 Views

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

0 Kudos
JGoer1
Beginner
700 Views

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 failed

When 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 binary

Thanks again for all your help!

0 Kudos
MEIYAN_L_Intel
Employee
700 Views

Hi,

 

Could you provide me the environment variable for further investigate?

 

Thanks

0 Kudos
Reply