Forum Discussion

Saikiranbelana's avatar
Saikiranbelana
Icon for New Contributor rankNew Contributor
3 years ago

Intel Devstack-OpenCL unable to detect PAC Cards

Intel Development Acceleration Stack for OpenCL is not detecting the Arria 10 PAC Cards on our server. It's looking for PAC drivers which cannot be found at the OpenCL_BSP installation path.

The Cards can be detected using `lspci` and `OPAE drivers` but not with `aocl diagnose` command:

System Specs:

OS: ubuntu - 18.04

The following is the log:

server2@ubuntu:~$ sudo fpgainfo fme
Board Management Controller, microcontroller FW version 26895
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ******//
Object Id                     : 0xEE00001
PCIe s:b:d:f                  : 0000:AF:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x124000200000367
Bitstream Version             : 1.2.4
Pr Interface Id               : 38d782e3-b612-5343-b934-2433e348ac4c
Boot Page                     : user
Board Management Controller, microcontroller FW version 26895
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ******//
Object Id                     : 0xEE00000
PCIe s:b:d:f                  : 0000:86:00:0
Device Id                     : 0x09C4
Socket Id                     : 0x00
Ports Num                     : 01
Bitstream Id                  : 0x124000200000367
Bitstream Version             : 1.2.4
Pr Interface Id               : 38d782e3-b612-5343-b934-2433e348ac4c
Boot Page                     : user                    
server2@ubuntu:~$ source ~/inteldevstack/init_env.sh 
export QUARTUS_HOME=/opt/intelFPGA_pro/quartus_19.2.0b57/quartus
export OPAE_PLATFORM_ROOT=/home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv
export AOCL_BOARD_PACKAGE_ROOT=/home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp
source /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/libexec/setup_permissions.sh
$OPAE_PLATFORM_ROOT/bin is in PATH already
sudo cp /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/sw/afu_platform_info /usr/bin/
export INTELFPGAOCLSDKROOT=/opt/intelFPGA_pro/quartus_19.2.0b57/hld
export ALTERAOCLSDKROOT=/opt/intelFPGA_pro/quartus_19.2.0b57/hld
$QUARTUS_HOME/bin is in PATH already
source /opt/intelFPGA_pro/quartus_19.2.0b57/hld/init_opencl.sh
server2@ubuntu:~$ aocl diagnose
--------------------------------------------------------------------
ICD System Diagnostics                                              
--------------------------------------------------------------------

Using the following location for ICD installation: 
        /etc/OpenCL/vendors

Found 2 icd entry at that location:
        /etc/OpenCL/vendors/Altera.icd
        /etc/OpenCL/vendors/Intel_FPGA_SSG_Emulator.icd

the following OpenCL libraries are referenced in the icd files:
        libalteracl.so
        libintelocl_emu.so

checking LD_LIBRARY_PATH for registered libraries:
        libalteracl.so was registered on the system at /opt/intelFPGA_pro/quartus_19.2.0b57/hld/host/linux64/lib
        libintelocl_emu.so was registered on the system at /opt/intelFPGA_pro/quartus_19.2.0b57/hld/host/linux64/lib

Using the following location for fcd installations:
        /opt/Intel/OpenCL/Boards

Found 2 fcd entry at that location:
        /opt/Intel/OpenCL/Boards/a10_ref.fcd
        /opt/Intel/OpenCL/Boards/dcp_bsp.fcd

the following OpenCL libraries are referenced in the fcd files:
        /opt/intelFPGA_pro/quartus_19.2.0b57/hld/board/a10_ref/linux64/lib/libaltera_a10_ref_mmd.so
        /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so

checking LD_LIBRARY_PATH for registered libraries:
        /opt/intelFPGA_pro/quartus_19.2.0b57/hld/board/a10_ref/linux64/lib/libaltera_a10_ref_mmd.so was registered on the system.
        /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib/libintel_opae_mmd.so was registered on the system.

Number of Platforms = 2 
        1. Intel(R) FPGA SDK for OpenCL(TM)                             | Intel(R) Corporation           | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.4
        2. Intel(R) FPGA Emulation Platform for OpenCL(TM)              | Intel(R) Corporation           | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.2
--------------------------------------------------------------------
ICD diagnostics PASSED                                              
--------------------------------------------------------------------
--------------------------------------------------------------------
BSP Diagnostics                                                     
--------------------------------------------------------------------
Error initializing DMA: no memory
Error initializing mmd dma
Error closing DMA
Error initializing bsp
Error initializing DMA: no memory
Error initializing mmd dma
Error closing DMA
Error initializing bsp
--------------------------------------------------------------------
Warning:
No devices attached for package:
/opt/intelFPGA_pro/quartus_19.2.0b57/hld/board/a10_ref
--------------------------------------------------------------------

Unable to find the kernel mode driver.

Please make sure you have properly installed the driver. To install the driver, run
      aocl install

DIAGNOSTIC_FAILED
--------------------------------------------------------------------
--------------------------------------------------------------------
Warning:
No devices attached for package:
/home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp
--------------------------------------------------------------------
Error initializing DMA: no memory
Error initializing mmd dma
Error closing DMA
Error initializing bsp
Error initializing DMA: no memory
Error initializing mmd dma
Error closing DMA
Error initializing bsp
--------------------------------------------------------------------

Call "aocl diagnose <device-names>" to run diagnose for specified devices
Call "aocl diagnose all" to run diagnose for all devices

server2@ubuntu:~$ aocl install
Do you want to setup the FCD at directory /opt/Intel/OpenCL/Boards [Y/n] y
aocl install: /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp is already registered in the system, please uninstall it before reinstalling

server2@ubuntu:~$ 

Please help us fix this @intel @BoonBengT_Altera @JohnT_Intel

Thank you,

Saikiran

16 Replies

  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,


    Can you check your "'/home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64"? I suspect that you have not un-archive or unzip the opencl BSP.


    Thanks


  • As suggested, I have bound the device using `lspci`. Below is the log.

    server2@ubuntu:~$ sudo lspci -n -v -s 0000:af:00.0
    af:00.0 1200: 8086:09c4
    	Subsystem: 8086:0000
    	Physical Slot: 5
    	Flags: bus master, fast devsel, latency 0, IRQ 39, NUMA node 1
    	Memory at dbffff00000 (64-bit, prefetchable) [size=512K]
    	Memory at dbfffe00000 (64-bit, prefetchable) [size=1M]
    	Capabilities: [68] MSI-X: Enable+ Count=7 Masked-
    	Capabilities: [78] Power Management version 3
    	Capabilities: [80] Express Endpoint, MSI 00
    	Capabilities: [100] Advanced Error Reporting
    	Capabilities: [160] Alternative Routing-ID Interpretation (ARI)
    	Capabilities: [200] Single Root I/O Virtualization (SR-IOV)
    	Capabilities: [280] #19
    	Kernel driver in use: intel-fpga-pci
    	Kernel modules: intel_fpga_pci
    
    server2@ubuntu:~$ sudo lspci -n -v -s 0000:86:00.0
    86:00.0 1200: 8086:09c4
    	Subsystem: 8086:0000
    	Physical Slot: 7
    	Flags: bus master, fast devsel, latency 0, IRQ 37, NUMA node 1
    	Memory at d7ffff00000 (64-bit, prefetchable) [size=512K]
    	Memory at d7fffe00000 (64-bit, prefetchable) [size=1M]
    	Capabilities: [68] MSI-X: Enable+ Count=7 Masked-
    	Capabilities: [78] Power Management version 3
    	Capabilities: [80] Express Endpoint, MSI 00
    	Capabilities: [100] Advanced Error Reporting
    	Capabilities: [160] Alternative Routing-ID Interpretation (ARI)
    	Capabilities: [200] Single Root I/O Virtualization (SR-IOV)
    	Capabilities: [280] #19
    	Kernel driver in use: intel-fpga-pci
    	Kernel modules: intel_fpga_pci
    
    server2@ubuntu:~$ aocl install
    Do you want to setup the FCD at directory /opt/Intel/OpenCL/Boards [Y/n] Y
    aocl install: Setting up the FPGA Client Driver (FCD) to the system. This process may require admin privilege
    Install the FCD file to /opt/Intel/OpenCL/Boards
    aocl install: Adding the board package /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp to the list of installed packages
    Installing the board package driver to the system.
    aocl install: Running install from /opt/intelFPGA_pro/quartus_19.2.0b57/hld/board/a10_ref/linux64/libexec
    cp: cannot stat '/home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/driver/*': No such file or directory
    sh: 0: Can't open ./make_all.sh
    aocl install: failed.
    aocl install: Removing FCD
    aocl install: Removing the board package /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp from the list of installed packages

    For some reason, `aocl install` command is searching for the driver folder which is non-existent in the BSP.

    I'm not sure how to diagnose this.

  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,


    Can you try to performed "lspci" and check if the driver is bind to the device? The reason is that when you are performing uninstall, the driver is not bind to the device.


  • When I try to reinstall, It says binary operator expected. Here's the log

    server2@ubuntu:~$ aocl uninstall
    Do you want to unset the FCD at directory /opt/Intel/OpenCL/Boards [Y/n] Y
    aocl uninstall: /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp is not installed, no need to uninstall.
    server2@ubuntu:~$ aocl install
    Do you want to setup the FCD at directory /opt/Intel/OpenCL/Boards [Y/n] n
    Please specify a directory to setup FCD:
    /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/
    aocl install: Setting up the FPGA Client Driver (FCD) to the system. This process may require admin privilege
    Install the FCD file to /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp
    aocl install: Adding the board package /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp to the list of installed packages
    Installing the board package driver to the system.
    aocl install: Running install from /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/libexec
    /home/server2/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/libexec/install: line 15: [: /dev/intel-fpga-port.0: binary operator expected
  • JohnT_Altera's avatar
    JohnT_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi,


    Can you try running "aocl uninstall" and "aocl install" to see if the issue is resolved?