Forum Discussion

SDabh's avatar
SDabh
Icon for New Contributor rankNew Contributor
6 years ago

Getting Started with the Intel FPGA SDK for OpenCL Pro Edition for Linux

Hello All,

I am working on Arria 10sx board and I want to run hello world example for OpenCL.

I have followed the steps "getting started eith the intel FPGA SDK for OpenCL Pro Edition for Linux" from "https://www.intel.com/content/www/us/en/programmable/documentation/mwh1391807309901.html#ewa1435159392013" this document.

1. Set up the Env. variables:

a. PATH and LD_LIBRARY_PATH

2. result for aocl version:

aocl 19.1.0.240 (Intel(R) FPGA SDK for OpenCL(TM), Version 19.1.0 Build 240 Pro Edition, Copyright (C) 2019 Intel Corporation)

3.Installing FPGA board:

After follwoing commands for installing FPGA board, I tried following command "aocl diagnose" an result i am getting is:

--------------------------------------------------------------------

ICD System Diagnostics

--------------------------------------------------------------------

Using the following location for ICD installation:

/etc/OpenCL/vendors

Found 4 icd entry at that location:

/etc/OpenCL/vendors/nvidia.icd

/etc/OpenCL/vendors/intel64.icd

/etc/OpenCL/vendors/Intel_FPGA_SSG_Emulator.icd

/etc/OpenCL/vendors/Altera.icd

the following OpenCL libraries are referenced in the icd files:

libnvidia-opencl.so.1

/opt/intel/system_studio_2019/opencl_compilers_and_libraries_18.1.0.013/linux/compiler/lib/intel64_lin/libintelocl.so

libintelocl_emu.so

libalteracl.so

checking LD_LIBRARY_PATH for registered libraries:

WARNING: libnvidia-opencl.so.1 NOT FOUND

WARNING: libnvidia-opencl.so.1 NOT FOUND

/opt/intel/system_studio_2019/opencl_compilers_and_libraries_18.1.0.013/linux/compiler/lib/intel64_lin/libintelocl.so was registered on the system.

WARNING: libintelocl_emu.so NOT FOUND

WARNING: libintelocl_emu.so NOT FOUND

libalteracl.so was registered on the system at /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/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/a10soc.fcd

/opt/Intel/OpenCL/Boards/a10_ref.fcd

the following OpenCL libraries are referenced in the fcd files:

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10_ref/linux64/lib/libaltera_a10_ref_mmd.so

checking LD_LIBRARY_PATH for registered libraries:

WARNING: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so NOT FOUND

WARNING: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so NOT FOUND

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10_ref/linux64/lib/libaltera_a10_ref_mmd.so was registered on the system.

Error: Could not load board library /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so (error_msg: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so: cannot open shared object file: No such file or directory)

Failed to dynamically load board MMD /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so

Error: Could not load board library /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so (error_msg: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so: cannot open shared object file: No such file or directory)

Failed to dynamically load board MMD /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/linux64/lib/libintel_a10soc32_mmd.so

Number of Platforms = 3

1. NVIDIA CUDA | NVIDIA Corporation | OpenCL 1.2 CUDA 9.1.84

2. Intel(R) CPU Runtime for OpenCL(TM) Applications | Intel(R) Corporation | OpenCL 2.1 LINUX

3. Intel(R) FPGA SDK for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 19.1

--------------------------------------------------------------------

ICD diagnostics PASSED

--------------------------------------------------------------------

--------------------------------------------------------------------

BSP Diagnostics

--------------------------------------------------------------------

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/arm32/bin/diagnose: 1: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/arm32/bin/diagnose: Syntax error: word unexpected (expecting ")")

--------------------------------------------------------------------

Warning:

No devices attached for package:

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/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/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc

--------------------------------------------------------------------

/home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/arm32/bin/diagnose: 1: /home/sunil/sunil-server/SUNIL_BOX2/software/intelFPGA_pro/19.1/hld/board/a10soc/arm32/bin/diagnose: Syntax error: word unexpected (expecting ")")

--------------------------------------------------------------------

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

Call "aocl diagnose all" to run diagnose for all devices

I am not sure where I am going wrong can anyone help me with this issue?

Thank you,

-Sunil

11 Replies

  • HRZ's avatar
    HRZ
    Icon for Frequent Contributor rankFrequent Contributor

    The log is quite clear as to what the problem is, and is even saying what should be done:

    Unable to find the kernel mode driver.
     
    Please make sure you have properly installed the driver. To install the driver, run
     
    aocl install

    Did you run "aocl install" as part of the steps mentioned in the Getting Started Guide?

  • SDabh's avatar
    SDabh
    Icon for New Contributor rankNew Contributor

    @HRZ​ Yes, I have tried "aocl install" and it is not running successfully hence I have ran the "aocl diagnose" command and pasted its result here. It does say, no device connected but I do have board connected and bsp files under hld/board/a10soc.

    Error message is as follows:

    aocl install: Setting up the FPGA Client Driver (FCD) to the system.

    Install the FCD file to /opt/Intel/OpenCL/Boards

    Installing the board package driver to the system.

    --------------------------------------------------------------------

    Warning: No board installation routine supplied.

    Please consult your board manufacturer's documentation or support

    team for information on how to properly install your board.

    --------------------------------------------------------------------

    Could you just give me brief idea if there is something which is missing in documents or I am not doing correctly?

    Thank you

    • HRZ's avatar
      HRZ
      Icon for Frequent Contributor rankFrequent Contributor

      I just realized you are using an SoC board and the a10soc BSP does not provide an install routine (which makes perfect sense since it is not supposed to be installed on an x86 machine). I have never used this board but the Cyclone V SoC board I used a long time ago came with a custom Linux that you wrote onto an SD Card and when you loaded from that OS, there was some OpenCL initialization script that set up the OpenCL environment. I am not sure how/why the diagnose script is seeing NVIDIA and Intel platforms in your case; are you running these commands on an x86 host?

      • SDabh's avatar
        SDabh
        Icon for New Contributor rankNew Contributor

        Hello HRZ, thank you for reply. So the first thing first, I have the arria 10 soc board for which the image which I got with the board is broken. So what I am trying here is, considering version 17. has a enough stablility and trying to use 17 image. But for this image I don't see any init_opencl file. So, workaround I downloaded RTE 17.0 version from intel which has init_opencl script but this only has support for a10_ref(GX ) board. So next thing I did is just copied the hld/board/a10soc folder to sd card and then I tried to do aocl diagnose and I am still getting the same result.

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

      Hi,

      Are you running on Windows 8 or 10? If you the "aocl diagnose" fail even if your board is installed, this is a known issue and here is the work around:

      On Windows 8.1 or Windows 10 systems, you might also need to disable signed driver verification. For details, see the following articles:

      See if it helps.

      Regards.

      • SDabh's avatar
        SDabh
        Icon for New Contributor rankNew Contributor

        Hi eli.ign, I am not using windows. I am using linux.

  • CJohn56's avatar
    CJohn56
    Icon for New Contributor rankNew Contributor

    Hi,

    I am having the same problem with the same board and Intel OpenCL for FPGA version 19.3.

    I have tried to follow the guide on building the SD card, but I am having trouble with building the driver, due to generating the device tree blob.

    Will there be released a pre built SD card image for version 19.3 (or 19.1), or is 18.1 the latest version as SDabh mentions, which comes with a pre built image?

    I have tried the 19.1 GSRD, but it does not come with the driver.