Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
655 Discussions

Possible bug in FPGA OpenCL runtime for v18.1.0 (verified with a10_ref)

DongWang-BJTU
New Contributor I
1,693 Views

I am currently using an a10 reference board, and I have recently upgraded to v18.1.0. I recompiled the official helloword example, and found out the host program crashed like follows,

1.JPG

 

 

So, I digged into the file ./common/src/AOCLUtils/opencl.cpp, and printed out the value of variable num_devices for the clGetDeviceIDs function, and it always show a value of "33".

5.JPG

 

 

Therefore, in the host program of the example, I changed the device num to 32 as follow

3.JPG

 

This time, it works correctly:

2.JPG

 

 

Is this possibly a bug ? I am using Ubuntu 14.04, and there is no such issue with the DE5net board and v18.1 std version runtime.

 

0 Kudos
9 Replies
MuhammadAr_U_Intel
1,231 Views
Hi, Do you have multiple platform connected to the host or A10GX is the only one in this case? Or Multiple BSP's installed on the host, try uninstalling all the other BSP's and see if this helps. Thanks, Arslan
0 Kudos
DongWang-BJTU
New Contributor I
1,231 Views

Thx for the reply. I do have multiple boards on the machine. The other one is de5net. But before installing the driver for a10_ref, I have uninstalled the driver of the de5net board.

0 Kudos
MuhammadAr_U_Intel
1,231 Views
Do you see multiple FCD files in /opt/Intel/OpenCL/Boards/ ?
0 Kudos
DongWang-BJTU
New Contributor I
1,231 Views

Yes, there are multiple FCD files in /opt/Intel/OpenCL/Boards/. I did not know these hidden files. Problem solved when deleted other icd files manually. Thx.

 

BTW, how should user properly choose between different fpga devices in the host program when multiple boards are installed on the same machine ?

 

 

 

 

 

MuhammadAr_U_Intel
1,231 Views
You may also want to try the workaround suggested for a similar issue on Windows. https://www.intel.com/content/www/us/en/programmable/documentation/ewa1412772636144.html#ewa1412773000284 Issue Details: For Windows, when the host application queries the number of devices, calls to clGetDeviceIDs return 128 devices regardless of the actual number of devices present. Note: You can find the actual available devices at the beginning of the device list returned by clGetDeviceIDs. This issue affects the Intel® Arria® 10 GX FPGA Development Kit Reference Platform and the Intel® Stratix® 10 GX FPGA Development Kit Reference Platform. Workaround: Perform one of the following workarounds: Rewrite the host application to limit the query for clGetDeviceIDs to the actual number of devices. Rewrite the host application to use clGetDeviceInfo to query which devices are available. Calling clGetDeviceInfo with the CL_DEVICE_AVAILABLE flag correctly reports that extraneous devices are unavailable. Rewrite the host application to only call clCreateContext with the actual number of devices. Calling clCreateContext with extraneous devices will fail with the error CL_DEVICE_NOT_AVAILABLE. Set the environment variable CL_OVERRIDE_NUM_DEVICES_INTELFPGA to the correct number of devices. Doing so fixes the erroneous behavior of clGetDeviceIDs. Thanks, Arslan
0 Kudos
MuhammadAr_U_Intel
1,231 Views
Glad to know you are able to proceed with suggested workaround of deleting the un-used FCD files.
0 Kudos
DongWang-BJTU
New Contributor I
1,232 Views

How could I keep the runtime enviorment for both boards on the same machine. When I run the application for de5-net, the following error shows up:

 

捕获.JPG

It seems that the runtime is loading the lib file from the a10_ref BSP folder, however, I have set the AOCL_BOARD_PACEKAGE_ROOT varaible to de5-net 's BPS folder.

 

0 Kudos
HRZ
Valued Contributor III
1,231 Views

Check you ~/.profile; recently the installer of Quartus adds its environmental variables directly to that file which might conflict with your configuration in ~/.bashrc.

0 Kudos
DongWang-BJTU
New Contributor I
1,228 Views

Thx for the reply. I have cleaned the envs in ~/.profile, but it still did not work correctly. I seems that the runtime always found the FCD file for de5net board as the default FCD configuration even there was another FCD for a10_ref board.

0 Kudos
Reply