Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JGoer1
Beginner
948 Views

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!

0 Kudos
29 Replies
MEIYAN_L_Intel
Employee
432 Views

Hi,

May I know the information as below:

  1. OS used
  2. Quartus Version and Edition
  3. 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_...

Thanks

 

JGoer1
Beginner
432 Views

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
Employee
432 Views

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
Beginner
432 Views

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
Beginner
432 Views

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
Employee
432 Views

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
Beginner
432 Views

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 failed

 

 

I have run the following commands to set up the number of devices:

$ export CL_CONFIG_CPU_EMULATE_DEVICES=1 host $ bin/host -emulator

I found this thread (https://forums.intel.com/s/question/0D50P00003yyS6sSAE/compile-and-run-issues-of-hello-world?languag...) 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
Beginner
432 Views

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
Employee
432 Views

Hi,

According to https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl_getting_... 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
Beginner
432 Views

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 binary

Just to confirm, here is what I have CL_CONFIG_CPU_EMULATE_DEVICES set to:

 

$ echo $CL_CONFIG_CPU_EMULATE_DEVICES 1 bin/host

 

MEIYAN_L_Intel
Employee
432 Views

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
Beginner
432 Views

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
Beginner
432 Views

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
Beginner
432 Views

Hello,

 

I'm having the exact same issue. Where you able to fix this?

 

Thanks,

Esteban VAlverde

JGoer1
Beginner
432 Views

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
Employee
432 Views

Hi,

I would like to confirm the latest problem is regarding to the ERROR: CL_INVALID_BINARY or Aborted (core dumped)?

Thanks

 

JGoer1
Beginner
432 Views

Hi there,

 

Yes, my current issue is the ERROR: CL_INVALID_BINARY error.

Thanks!

JGoer1
Beginner
432 Views

And just want to confirm the versions I'm using:

Ubuntu: 16.04

Intel FPGA OpenCL SDK: 19.3

JGoer1
Beginner
432 Views

I have also run aocl diagnose complains about not having a board installed, but that shouldn't be an issue for the emulator right?

MEIYAN_L_Intel
Employee
211 Views

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

Reply