cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timhollist
Observer
Observer
1,063 Views
Registered: ‎11-06-2018

Running "Hello World" on Alveo U200

Jump to solution

I'm trying to run a "Hello World" program (github.com/Xilinx/Vitis_Accel_Examples) on an Alveo U200.  The simple code will not compile.

I've followed UG1301.  The U200 is installed and validated succesfully in a Dell R940xa running CentOS.   XRT and XDMA versions were downloaded directly from the website (https://www.xilinx.com/products/boards-and-kits/alveo/u200.html#gettingStarted  ==> xrt_201920.2.3.1301_7.4.1708-xrt.rpm xilinx-u200-xdma-201830.2-2580015.x86_64.rpm xilinx-u200-xdma-dev-201830.2-2580015.x86_64.rpm).    I'm a little suspicious that the XDMA version is older than the XRT version or the Makefile's default DEVICE=xilinx_u200_xdma_201920_1 in the git repository, but I'm unable to find a later version of xdma anywhere on the Xilinx website.   Vitis 2019.2 is installed and environment sourced (source /opt/xilinx/Vitis/2019.2/settings64.sh).  XRT environment is sourced (source /opt/xilinx/xrt/setup.sh).  I haven't found anything useful from the compiler log messages, forums, or internet searches.

Any other suggestions?

 

$ make TARGET=hw DEVICE=xilinx_u200_xdma_201830_2 all
utils.mk:65: [WARNING]: g++ version older. Using g++ provided by the tool : /opt/xilinx/Vivado/2019.2/tps/lnx64/gcc-6.2.0/bin/g++
/opt/xilinx/Vivado/2019.2/tps/lnx64/gcc-6.2.0/bin/g++ -I..//common/includes/xcl2 -I/opt/xilinx/xrt/include -I/opt/xilinx/Vivado/2019.2/include -Wall -O0 -g -std=c++11 -fmessage-length=0 ..//common/includes/xcl2/xcl2.cpp src/host.cpp -o 'host' -L/opt/xilinx/xrt/lib -lOpenCL -lpthread -lrt -lstdc++
mkdir -p ./build_dir.hw.xilinx_u200_xdma_201830_2
v++ -t hw --platform xilinx_u200_xdma_201830_2 --save-temps --temp_dir ./build_dir.hw.xilinx_u200_xdma_201830_2 -l -o'build_dir.hw.xilinx_u200_xdma_201830_2/vadd.xclbin' _x.hw.xilinx_u200_xdma_201830_2/vadd.xo
Option Map File Used: '/opt/xilinx/Vitis/2019.2/data/vitis/vpp/optMap.xml'

****** v++ v2019.2 (64-bit)
**** SW Build 2708876 on Wed Nov 6 21:39:14 MST 2019
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

INFO: [v++ 60-1306] Additional information associated with this v++ link can be found at:
Reports: /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/reports/link
Log files: /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/logs/link
Running Dispatch Server on port:45757
INFO: [v++ 60-1548] Creating build summary session with primary output /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/vadd.xclbin.link_summary, at Mon Jan 20 21:48:07 2020
INFO: [v++ 60-1316] Initiating connection to rulecheck server, at Mon Jan 20 21:48:07 2020
Running Rule Check Server on port:46626
INFO: [v++ 60-1315] Creating rulecheck session with output '/home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/reports/link/v++_link_vadd_guidance.html', at Mon Jan 20 21:48:08 2020
INFO: [v++ 60-895] Target platform: /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/xilinx_u200_xdma_201830_2.xpfm
INFO: [v++ 60-1578] This platform contains Device Support Archive '/opt/xilinx/platforms/xilinx_u200_xdma_201830_2/hw/xilinx_u200_xdma_201830_2.dsa'
INFO: [v++ 60-629] Linking for hardware target
INFO: [v++ 60-423] Target device: xilinx_u200_xdma_201830_2
INFO: [v++ 60-1332] Run 'run_link' status: Not started
INFO: [v++ 60-1443] [21:48:16] Run run_link: Step system_link: Started
INFO: [v++ 60-1453] Command Line: system_link --xo /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/_x.hw.xilinx_u200_xdma_201830_2/vadd.xo -keep --xpfm /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/xilinx_u200_xdma_201830_2.xpfm --target hw --output_dir /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/link/int --temp_dir /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/link/sys_link
INFO: [v++ 60-1454] Run Directory: /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/link/run_link
ERROR: [SYSTEM_LINK 82-39] Unable to run blocking command: command not found: -o -j /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/hw/xilinx_u200_xdma_201830_2.dsa dsa.xml -d /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/build_dir.hw.xilinx_u200_xdma_201830_2/link/sys_link
ERROR: [SYSTEM_LINK 82-87] Unable to read hardware platform file /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/hw/xilinx_u200_xdma_201830_2.dsa and extract meta-data file
INFO: [SYSTEM_LINK 60-1316] Initiating connection to rulecheck server, at Mon Jan 20 21:48:17 2020
ERROR: [SYSTEM_LINK 82-89] Unable to read platform default clock ID to resolve clock ID
ERROR: [SYSTEM_LINK 82-90] Unable to resolve clock ID
ERROR: [SYSTEM_LINK 82-66] Error processing .xo files
ERROR: [SYSTEM_LINK 82-100] Error processing object files, exiting
INFO: [v++ 60-1442] [21:48:17] Run run_link: Step system_link: Failed
Time (s): cpu = 00:00:00.95 ; elapsed = 00:00:01 . Memory (MB): peak = 585.777 ; gain = 0.000 ; free physical = 1530834 ; free virtual = 1538211
ERROR: [v++ 60-661] v++ link run 'run_link' failed
ERROR: [v++ 60-626] Kernel link failed to complete
ERROR: [v++ 60-703] Failed to finish linking
make: *** [build_dir.hw.xilinx_u200_xdma_201830_2/vadd.xclbin] Error 1

0 Kudos
1 Solution

Accepted Solutions
willmontaraces
Visitor
Visitor
876 Views
Registered: ‎02-06-2019

Hi, I encountered this problem today on ubuntu 18.04 and managed to solve it running the following script:

https://github.com/Xilinx/XRT/blob/master/src/runtime_src/tools/scripts/xrtdeps.sh

Hope this solves your issue.

View solution in original post

5 Replies
mcertosi
Xilinx Employee
Xilinx Employee
973 Views
Registered: ‎10-19-2015

Hi @timhollist 

ERROR: [SYSTEM_LINK 82-87] Unable to read hardware platform file /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/hw/xilinx_u200_xdma_201830_2.dsa and extract meta-data file

Looks like the error is saying it cannot find the development platform on your system.

Did you install both the deployment shell and the development shell? Could you show me the install logs? 

xilinx-u200-xdma-dev-201830.2-2580015.x86_64.rpm

xilinx-u200-xdma-201830.2-2580015.x86_64.rpm

I'm a little suspicious that the XDMA version is older than the XRT version or the Makefile's default DEVICE=xilinx_u200_xdma_201920_1 in the git repository. 

Good suspicion, The XDMA version is indicating the version of the tools we compiled the platform. It is compatible with XRT drivers made after it. I believe the MakeFile pointing to a shell that does not exist is a mistake. That mistake should not have consequences to your build. 

As a test, I ran a command that points to a nonsense DEVICE:

make all TARGET=hw DEVICE=xdma

The result was that the makefile printed off a list of available devices

ERROR: [v++ 60-1258] No valid platform was found that matches 'xdma'. Please make sure that the platform is specified correctly, and the platform has the right version number. The platform repo paths are:
/proj/rdi/xbuilds/2019.2_released/internal_platforms
/proj/gsd/vivado/Vitis/2019.2/platforms

Could you run the same test and copy the output here? 

Thanks,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
timhollist
Observer
Observer
948 Views
Registered: ‎11-06-2018
Yes, I installed both xdma packages. Logs:
$ sudo yum install ./xilinx-u200-xdma-*
Loaded plugins: fastestmirror
Examining ./xilinx-u200-xdma-201830.1-2405991.x86_64.rpm: xilinx-u200-xdma-201830.1-2405991.x86_64
Marking ./xilinx-u200-xdma-201830.1-2405991.x86_64.rpm to be installed
Examining ./xilinx-u200-xdma-dev-201830.1.x86_64.rpm: xilinx-u200-xdma-dev-201830.1-2405991.x86_64
Marking ./xilinx-u200-xdma-dev-201830.1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package xilinx-u200-xdma.x86_64 0:201830.1-2405991 will be installed
---> Package xilinx-u200-xdma-dev.x86_64 0:201830.1-2405991 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================
Installing:
xilinx-u200-xdma x86_64 201830.1-2405991 /xilinx-u200-xdma-201830.1-2405991.x86_64 371 M
xilinx-u200-xdma-dev x86_64 201830.1-2405991 /xilinx-u200-xdma-dev-201830.1.x86_64 537 M

Transaction Summary
==================================================================================================================================================================================================================
Install 2 Packages

Total size: 908 M
Installed size: 908 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : xilinx-u200-xdma-201830.1-2405991.x86_64 1/2
DSA package installed successfully.
Please flash card manually by running below command:
sudo /opt/xilinx/xrt/bin/xbutil flash -a xilinx_u200_xdma_201830_1 -t 1542252769
Installing : xilinx-u200-xdma-dev-201830.1-2405991.x86_64 2/2
Verifying : xilinx-u200-xdma-dev-201830.1-2405991.x86_64 1/2
Verifying : xilinx-u200-xdma-201830.1-2405991.x86_64 2/2

Installed:
xilinx-u200-xdma.x86_64 0:201830.1-2405991 xilinx-u200-xdma-dev.x86_64 0:201830.1-2405991

Complete!
0 Kudos
timhollist
Observer
Observer
946 Views
Registered: ‎11-06-2018
The results of the "nonsense DEVICE":
$ make all TARGET=hw DEVICE=xdma
utils.mk:65: [WARNING]: g++ version older. Using g++ provided by the tool : /opt/xilinx/Vivado/2019.2/tps/lnx64/gcc-6.2.0/bin/g++
/opt/xilinx/Vivado/2019.2/tps/lnx64/gcc-6.2.0/bin/g++ -I..//common/includes/xcl2 -I/opt/xilinx/xrt/include -I/opt/xilinx/Vivado/2019.2/include -Wall -O0 -g -std=c++11 -fmessage-length=0 ..//common/includes/xcl2/xcl2.cpp src/host.cpp -o 'host' -L/opt/xilinx/xrt/lib -lOpenCL -lpthread -lrt -lstdc++
mkdir -p ./_x.hw.xdma
v++ -t hw --platform xdma --save-temps --temp_dir ./_x.hw.xdma -c -k vadd -I'src' -o'_x.hw.xdma/vadd.xo' 'src/vadd.cpp'
Option Map File Used: '/opt/xilinx/Vitis/2019.2/data/vitis/vpp/optMap.xml'

****** v++ v2019.2 (64-bit)
**** SW Build 2708876 on Wed Nov 6 21:39:14 MST 2019
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

INFO: [v++ 60-1306] Additional information associated with this v++ compile can be found at:
Reports: /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/_x.hw.xdma/reports/vadd
Log files: /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/_x.hw.xdma/logs/vadd
Running Dispatch Server on port:39778
INFO: [v++ 60-1548] Creating build summary session with primary output /home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/_x.hw.xdma/vadd.xo.compile_summary, at Thu Jan 23 22:33:24 2020
INFO: [v++ 60-1316] Initiating connection to rulecheck server, at Thu Jan 23 22:33:24 2020
Running Rule Check Server on port:38817
INFO: [v++ 60-1315] Creating rulecheck session with output '/home/timmy/projects/alveo/Vitis_Accel_Examples/hello_world/_x.hw.xdma/reports/vadd/v++_compile_vadd_guidance.html', at Thu Jan 23 22:33:25 2020
ERROR: [v++ 60-1258] No valid platform was found that matches 'xdma'. Please make sure that the platform is specified correctly, and the platform has the right version number. The platform repo paths are:
/opt/xilinx/Vitis/2019.2/platforms
/opt/xilinx/platforms
The valid platforms found from the above repo paths are:
/opt/xilinx/Vitis/2019.2/platforms/xcvc1902_fixed/xcvc1902_fixed.xpfm
/opt/xilinx/platforms/xilinx_u200_xdma_201830_2/xilinx_u200_xdma_201830_2.xpfm

ERROR: [v++ 60-587] Failed to add a platform: specified platform xdma is not found or is not valid
ERROR: [v++ 60-592] Failed to finish compilation
make: *** [_x.hw.xdma/vadd.xo] Error 1
0 Kudos
willmontaraces
Visitor
Visitor
877 Views
Registered: ‎02-06-2019

Hi, I encountered this problem today on ubuntu 18.04 and managed to solve it running the following script:

https://github.com/Xilinx/XRT/blob/master/src/runtime_src/tools/scripts/xrtdeps.sh

Hope this solves your issue.

View solution in original post

timhollist
Observer
Observer
854 Views
Registered: ‎11-06-2018

@willmontaraces 

THANK YOU!   That was it!  A missing dependency.  I owe you one.

More specifically I was missing the "unzip" package.  I assume the ​xilinx_u200_xdma_201830_2.dsa file is compressed and needs unzip to uncompress.

Now this compiler message makes more sense:

ERROR: [SYSTEM_LINK 82-87] Unable to read hardware platform file /opt/xilinx/platforms/xilinx_u200_xdma_201830_2/hw/xilinx_u200_xdma_201830_2.dsa and extract meta-data file

XILINX - please add unzip as a dependency to your xdma-devel RPM.

 

0 Kudos