Application Acceleration With FPGAs
Programmable Acceleration Cards (PACs), DCP, FPGA AI Suite, Software Stack, and Reference Designs
489 Discussions

Hello world hang at launching kernel :(

tommygyl
Beginner
913 Views

I used aocl to install the bsp of a10_ref to the host used by pac_a10 by mistake, and it was not uninstalled correctly, and then the kernel could not be started error.

I tried to reinstall the stack and OPAE, but nothing changed. At the beginning, the BMC was unrecognizable, and it was recognized after rewriting. I don't know where the problem occurred. Currently hello world is stuck in this step.

Below are some instructions  in the command line

 

[guoyl@DIC210 inteldevstack]$ source init_env.sh
export QUARTUS_HOME=/home/guoyl/inteldevstack/intelFPGA_pro/quartus
export INTELFPGAOCLSDKROOT=/home/guoyl/inteldevstack/intelFPGA_pro/hld
Adding $QUARTUS_HOME/bin to PATH
export OPAE_PLATFORM_ROOT=/home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv
export AOCL_BOARD_PACKAGE_ROOT=/home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp
source /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/libexec/setup_permissions.sh
[sudo] password for guoyl:
Adding $OPAE_PLATFORM_ROOT/bin to PATH
sudo cp /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/sw/fpgaflash /usr/bin/
sudo cp /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/sw/afu_platform_info /usr/bin/
find /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/hw/samples/ -type d -name *S10* -exec rm -r {} +
[guoyl@DIC210 inteldevstack]$ source ./intelFPGA_pro/hld/init_opencl.sh
INTELFPGAOCLSDKROOT is set to /home/guoyl/inteldevstack/intelFPGA_pro/hld. Using that.

Found a Quartus directory at /home/guoyl/inteldevstack/intelFPGA_pro/quartus. Using that.

AOCL_BOARD_PACKAGE_ROOT is set to /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp. Using that.
Adding /home/guoyl/inteldevstack/intelFPGA_pro/hld/bin to PATH
Adding /home/guoyl/inteldevstack/intelFPGA_pro/hld/host/linux64/lib to LD_LIBRARY_PATH
Adding /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/lib to LD_LIBRARY_PATH
[guoyl@DIC210 inteldevstack]$ cd ./a10_gx_pac_ias_1_2_pv/
[guoyl@DIC210 a10_gx_pac_ias_1_2_pv]$ cd ./opencl
[guoyl@DIC210 opencl]$ sudo fpgainfo fme
Board Management Controller, microcontroller FW version 26889
Last Power Down Cause: POK_CORE
Last Reset Cause: None
//****** FME ******//
Object Id : 0xEF00000
PCIe s:b:d:f : 0000:5E:00:0
Device Id : 0x09C4
Socket Id : 0x00
Ports Num : 01
Bitstream Id : 0x123000200000185
Bitstream Version : 0x55D100030201
Pr Interface Id : 69528db6-eb31-577a-8c36-68f9faa081f6
[guoyl@DIC210 opencl]$ aocl diagnose
--------------------------------------------------------------------
Device Name:
acl0

Package Pat:
/home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp

Vendor: Intel Corp

Physical Dev Name Status Information

pac_a10_ee00000 Passed PAC Arria 10 Platform (pac_a10_ee00000)
PCIe 94:00.0
FPGA temperature = 38 degrees C.

DIAGNOSTIC_PASSED
--------------------------------------------------------------------

Call "aocl diagnose <device-names>" to run diagnose for specified devices
Call "aocl diagnose all" to run diagnose for all devices
[guoyl@DIC210 opencl]$ aocl diagnose all
Using platform: Intel(R) FPGA SDK for OpenCL(TM)
Using Device with name: pac_a10 : PAC Arria 10 Platform (pac_a10_ee00000)
Using Device from vendor: Intel Corp
clGetDeviceInfo CL_DEVICE_GLOBAL_MEM_SIZE = 8589934592
clGetDeviceInfo CL_DEVICE_MAX_MEM_ALLOC_SIZE = 8588886016
Memory consumed for internal use = 1048576
Actual maximum buffer size = 8588886016 bytes
Writing 8191 MB to global memory ...
Allocated 1073741824 Bytes host buffer for large transfers
Write speed: 6882.01 MB/s [6666.02 -> 6915.09]
Reading and verifying 8191 MB from global memory ...
Read speed: 5709.07 MB/s [5597.57 -> 5732.11]
Successfully wrote and readback 8191 MB buffer

Transferring 262144 KBs in 512 512 KB blocks ... 3284.42 MB/s
Transferring 262144 KBs in 256 1024 KB blocks ... 3487.11 MB/s
Transferring 262144 KBs in 128 2048 KB blocks ... 4633.19 MB/s
Transferring 262144 KBs in 64 4096 KB blocks ... 5545.22 MB/s
Transferring 262144 KBs in 32 8192 KB blocks ... 6104.70 MB/s
Transferring 262144 KBs in 16 16384 KB blocks ... 6493.32 MB/s
Transferring 262144 KBs in 8 32768 KB blocks ... 6673.12 MB/s
Transferring 262144 KBs in 4 65536 KB blocks ... 6781.04 MB/s
Transferring 262144 KBs in 2 131072 KB blocks ... 6832.05 MB/s
Transferring 262144 KBs in 1 262144 KB blocks ... 6790.06 MB/s

As a reference:
PCIe Gen1 peak speed: 250MB/s/lane
PCIe Gen2 peak speed: 500MB/s/lane
PCIe Gen3 peak speed: 985MB/s/lane

Writing 262144 KBs with block size (in bytes) below:

Block_Size Avg Max Min End-End (MB/s)
524288 2453.98 3207.77 1047.74 2178.14
1048576 2850.99 3487.11 437.06 2666.77
2097152 4001.65 4633.19 661.22 3869.68
4194304 4771.12 5545.22 843.84 4715.39
8388608 5798.33 6104.70 4840.61 5758.76
16777216 6221.50 6493.32 5628.93 6198.16
33554432 6503.75 6673.12 6062.32 6485.37
67108864 6645.89 6781.04 6458.26 6635.32
134217728 6734.82 6832.05 6640.33 6730.87
268435456 6790.06 6790.06 6790.06 6790.06

Reading 262144 KBs with block size (in bytes) below:

Block_Size Avg Max Min End-End (MB/s)
524288 2529.34 3284.42 1090.88 2216.59
1048576 2615.72 3370.35 1951.17 2435.66
2097152 2766.51 3441.41 2292.43 2701.17
4194304 2916.59 3423.85 2504.06 2894.45
8388608 3860.60 4387.32 2025.62 3829.12
16777216 4366.67 5264.35 2207.52 4351.95
33554432 4829.33 5488.24 3152.20 4821.22
67108864 3172.60 3581.58 2703.75 3171.20
134217728 5147.42 5571.98 4782.98 5146.21
268435456 5239.59 5239.59 5239.59 5239.59

Write top speed = 6832.05 MB/s
Read top speed = 5571.98 MB/s
Throughput = 6202.02 MB/s

DIAGNOSTIC_PASSED
[guoyl@DIC210 opencl]$ aocl program acl0 hello_world.aocx
aocl program: Running program from /home/guoyl/inteldevstack/a10_gx_pac_ias_1_2_pv/opencl/opencl_bsp/linux64/libexec
Program succeed.
[guoyl@DIC210 opencl]$ ./host hello_world.aocx
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 17.1.1

Querying device for info:
========================
CL_DEVICE_NAME = pac_a10 : PAC Arria 10 Platform (pac_a10_ee00000)
CL_DEVICE_VENDOR = Intel Corp
CL_DEVICE_VENDOR_ID = 4466
CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 17.1.1
CL_DRIVER_VERSION = 17.1
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 = 8589934592
CL_DEVICE_IMAGE_SUPPORT = true
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 = 2147483648
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? = false
Command queue profiling enabled? = true
Using AOCX: hello_world.aocx

Kernel initialization is complete.
Launching the kernel...

 

 

0 Kudos
1 Reply
EricMunYew_C_Intel
Moderator
871 Views
0 Kudos
Reply