cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,062 Views
Registered: ‎03-27-2020

Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Dear All,

 

I am following below link for creating bitstream for alveo u200:

https://developer.xilinx.com/en/articles/code-busting-fpga-blockchain-myths-part-3.html

 

as per the section "Generating the DAG", I have to generate a file, name as "dataset",

but i am not able to generate it by using mentioned python code.

 

 99% code is ready from my side, just need this dataset file to complete the procedure.

could you plz help me on this.

 

I have successfully compiled ethash:

[root@localhost build]# ./src/benchmark/Benchmark_FULL
ethash_mkcache: 580ms, sha3: 6a286c5fc0f36814732c86c3e71c036dd96d58def86b9244bb1480571e67d2a8
ethash_light test: 10ms, a7ea1de3a8007134900cd2c86f7e55af68a1d3e4537438a0a966b6cbafa23c90
ethash_compute_full_data: 178740ms
ethash_full test: 0ns, a7ea1de3a8007134900cd2c86f7e55af68a1d3e4537438a0a966b6cbafa23c90
hashrate: 156038, bw: 1219 MB/s
[root@localhost build]#


[root@localhost build]# cat dag_generation.py
import pyethash

with open("cache","rb") as fcache:
cache = fcache.read()

# Using same block 0 from benchmark code
data_size = pyethash.get_full_size(0)

print("Generating dataset (DAG) of size %d." % data_size)
dataset = pyethash.calc_dataset_bytes(data_size, cache)

with open("dataset","w+b") as fcache:
fcache.write(dataset)
[root@localhost build]#

 

error :

[root@localhost build]#
[root@localhost build]# python dag_generation.py
Traceback (most recent call last):
File "dag_generation.py", line 7, in <module>
data_size = pyethash.get_full_size(0)
AttributeError: 'module' object has no attribute 'get_full_size'
[root@localhost build]#
[root@localhost build]#

Priyesh Manwatkar
0 Kudos
19 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,020 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

How did you meet the requirements to compile the python tests? 

What commands did you run? 

I could not find all these requirements. 

pyethereum==0.7.522
nose==1.3.4
pysha3==0.3    

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Tags (4)
0 Kudos
Highlighted
Visitor
Visitor
975 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @mcertosi 

 

Note: I am using centos 7.7

go to "ethash/test/python" directory

run below command:

python -m pip install --upgrade pip

then run test script:

sh test.sh

pip will install your required modules,
if you still getting pip error,
follow below step:

cp ./test.sh ./test2.sh

vi test2.sh ## will edit the file

## After Line number 14, add below line

python -m pip install --upgrade pip

and save and close the file [:wq!]

it will look like below,
======================================
[ -d $TEST_DIR/python-virtual-env ] || virtualenv --system-site-packages $TEST_DIR/python-virtual-env
source $TEST_DIR/python-virtual-env/bin/activate
python -m pip install --upgrade pip
=======================================

above step will definitely solve your pip error

now if your pip is still not able install 3 packages which are pyethereum, nose and sha3

install it manually,

pip install pyethereum
pip install sha3
pip install nose

if you are still facing issue, again edit the test2.sh and insert below 3 lines after line no 14

pip install pyethereum
pip install pysha3
pip install nose

and run test2.sh again

if still not working, go to https://pypi.org/

and download below files

1. ctypes [http://downloads.sourceforge.net/project/ctypes/ctypes/1.0.2/ctypes-1.0.2.tar.gz]
2. pyethereum [https://files.pythonhosted.org/packages/b7/98/2b4f6aa4eba350af61e47c5f115e75a1c50517a5d7756f4f0527f7375bf3/pyethereum-1.0.0-py3-none-any.whl]
3. nose [https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz]
4. pysha3 [https://files.pythonhosted.org/packages/73/bf/978d424ac6c9076d73b8fdc8ab8ad46f98af0c34669d736b1d83c758afee/pysha3-1.0.2.tar.gz]

download above files and extract it
now go to ctypes directory
and run command: python setup.py install
it will install the package

now, do this for all packages

pyethereum is a wheel file with extension .whl,
to install this file, run below command:
python -m pip install --upgrade ./whl_file_name

now you can try your original test.sh file

sh test.sh

After resolution, your output will look like below,

===============================================
[root@localhost python]# sh test2.sh
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Could not find a version that satisfies the requirement pyethereum (from versions: none)
ERROR: No matching distribution found for pyethereum
===============================================


my code is 99% ready in vitis, i am just looking for dag file,
i have created my own code (pasted from https://github.com/ethereum/wiki/wiki/Ethash) to generate dag and caclulate data bytes,
it is running from last 2 hours.

I have tried other repos like "go-ethereum" and generated dag successfully, but it is not working in vitis, throwing below error:


[Console output redirected to file:/home/softwares/vitis/workspace/ethash_u200/Emulation-SW/ethash_u200-Default.launch.log]
Loading: '../binary_container_1.xclbin'
XRT build version: 2.5.309
Build hash: 9a03790c11f066a5597b133db737cf4683ad84c8
Build date: 2020-02-24 02:54:37
Git branch: 2019.2_PU2
PID: 6232
UID: 0
[Sat Mar 28 14:04:26 2020]
HOST: localhost.localdomain
EXE: /home/softwares/vitis/workspace/ethash_u200/Emulation-SW/ethash_u200
[XRT] ERROR: Map CL_MEM_WRITE_ONLY buffer for write is undefined
[XRT] ERROR: Map CL_MEM_WRITE_ONLY buffer for write is undefined
dag loaded
Software emulation of compute unit(s) exited unexpectedly

 

 

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
912 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

@priyesh 

It doesn't look like Shaun generated the DAG in Vitis. Seems more like he used the Python scripts to generate the dag. 

"Now’s a good time to run the code and just confirm that it’s still doing what we expect after all the important changes.  Note the code assumes the availability of the DAG file in the Emulation-SW folder of the project (named ‘dataset’ in the screenshot below).  This is simply the file generated by the Python script covered earlier."

And it seems like you have generated a DAG, so just make sure to include that in your program and then you should be ready to go. 

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
900 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

hey @mcertosi ,

 

I have successfully generated dag and added to Emulation-SW folder.

Now i am getting below error,

 

[Console output redirected to file:/home/softwares/vitis/workspace/ethash_u200/Emulation-SW/ethash_u200-Default.launch.log]
Loading: '../binary_container_1.xclbin'
XRT build version: 2.5.309
Build hash: 9a03790c11f066a5597b133db737cf4683ad84c8
Build date: 2020-02-24 02:54:37
Git branch: 2019.2_PU2
PID: 5496
UID: 0
[Tue Mar 31 01:01:42 2020]
HOST: localhost.localdomain
EXE: /home/softwares/vitis/workspace/ethash_u200/Emulation-SW/ethash_u200
[XRT] ERROR: Map CL_MEM_WRITE_ONLY buffer for write is undefined
[XRT] ERROR: Map CL_MEM_WRITE_ONLY buffer for write is undefined
dag loaded
Software emulation of compute unit(s) exited unexpectedly

 

Kindly suggest on this.

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
875 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh

The OCL layer above XRT throws that error in this instance. The host code defines *p_res_mix as read only, but then tries to grab the object pointer as write only. 

if ((xocl(buffer)->get_flags() & CL_MEM_WRITE_ONLY) && map_flags == CL_MAP_WRITE)
throw error(CL_MAP_FAILURE,"Map CL_MEM_WRITE_ONLY buffer for write is undefined");

In pow.cpp - 

Line 167  cl::Buffer buf_res_mix(context, CL_MEM_WRITE_ONLY, size_hsh); // this says the buffer is write only for the Kernel, and read only for the host code. 

Line 181    char *p_res_mix = (char *) q.enqueueMapBuffer (buf_res_mix , CL_TRUE , CL_MAP_WRITE , 0, size_hsh); //here the host code tries to write to read only memory.

Line 182    char *p_res_hsh = (char *) q.enqueueMapBuffer (buf_res_hsh , CL_TRUE , CL_MAP_WRITE , 0, size_hsh);

These lines wont work, looks like XRT was updated after Shaun wrote the post to prevent this behavior. Looks like the buffer is only read from in the rest of the host code so you should be able to just switch CL_MAP_WRITE to CL_MAP_READ. 

Change those lines to use CL_MAP_READ and retest: 

char *p_res_mix = (char *) q.enqueueMapBuffer (buf_res_mix , CL_TRUE , CL_MAP_READ , 0, size_hsh);

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Visitor
Visitor
834 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @mcertosi ,

Thanks for the solution, CL_MAP_WRITE has been resolved.

But, I am still facing the dataset issue,

getting below error in Emulation-HW,

=======================================================================

[Console output redirected to file:/home/softwares/vitis/workspace/ethash_with_3gb_dataset/Emulation-HW/ethash_with_3gb_dataset-Default.launch.log]
Loading: '../binary_container_1.xclbin'
INFO: [HW-EM 01] Hardware emulation runs simulation underneath. Using a large data set will result in long simulation times. It is recommended that a small dataset is used for faster execution. The flow uses approximate models for DDR memory and interconnect and hence the performance data generated is approximate.
failed to load dag
error: only 0 could be read
eof: 0
fail: 1
bad: 0
mix: 08d0dba65d05bcc8e27f0004f39d8c5d08d0dba65d05bcc8e27f0004f39d8c5d
hsh: 9fc8063101222bff7f66763c8e44e0d391f22e536c3660d936b8d66f40bbbc14
INFO::[ Vitis-EM 22 ] [Time elapsed: 0 minute(s) 30 seconds, Emulation time: 0.107857 ms]
Data transfer between kernel(s) and global memory(s)
krnl_ethash_1:m_axi_gmem-DDR[1] RD = 8.062 KB WR = 0.125 KB

INFO: [HW-EM 06-0] Waiting for the simulator process to exit
INFO: [HW-EM 06-1] All the simulator processes exited successfully

=======================================================================

As per my knowledge, the hsh: 9fc8063101222bff7f66763c8e44e0d391f22e536c3660d936b8d66f40bbbc14 above is not matching with the hash generated by benchmark code [hsh: a7ea1de3a8007134900cd2c86f7e55af68a1d3e4537438a0a966b6cbafa23c90].

 

 

Please find the below code, which I used to generate dataset

=============================

import pyethash

cache_size = pyethash.get_cache_size(0)
seed = pyethash.get_seedhash(0)
cache = pyethash.mkcache_bytes(cache_size, seed)

# Using same block 0 from benchmark code
data_size = pyethash.get_full_size(0)

print("Generating dataset (DAG) of size %d." % data_size)
dataset = pyethash.calc_dataset_bytes(data_size, cache)

with open("dataset","w+b") as fcache:
fcache.write(dataset)

=============================

 

 

 

Could you please explain the python code mentioned by shaun, specially the cache part.

It looks like, I have to create a file with name cache, but should I keep it blank or what should I put in that file.

 

Thanks in advance.

 

 

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
827 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

The goal of the Python script is to help in the generation of auxiliary parameters that need to be passed into the ethash function for it to perform correctly. The auxiliary parameters are not being accelerated and in this example they are considered static. This helps with an apples to apples comparison from the strictly software PoW function to the accelerated PoW function. 

  • ethash_params:  This contained information about the size of some data, including the DAG.  To simplify things for now we discard this argument and test on a fixed size DAG.

For the hardware to do something, you'll need to get a DAG and load it into memory. The error message you are seeing is saying that there isn't any information in the DAG file. The DAG should be 1G in size. 

The DAG is not specific to this article and can be generated however you see fit. Reading through the Ethereum Git some more, there is a DAG section -> https://github.com/ethereum/wiki/wiki/Ethash-DAG 

This documentation suggests that users like to store sections of the DAG in a cache - this is where cache comes in in our example. The cache is the DAG data. The alternative is to calculate it using the DAG function, as stated in the blog this takes ~10 minutes and wouldn't be practical for testing. 

In our example, the python script was used to generate the DAG, and then save it to a file, that file can be considered cached DAG data.  

When you were running Emulation-SW, I saw the print-off that the DAG was read in. The run probably didn't check the size of the data though. Was the dataset file in your project ~1G? 

What does your dataset file look like? 

The format of the file is described in the link above, quoted below. 

Format
Each file should begin with an 8-byte magic number, 0xfee1deadbaddcafe, written in little-endian format 
(i.e., bytes fe ca dd ba ad de e1 fe). The Ethash algorithm expects the DAG as a two-dimensional array of uint32s (4-byte unsigned ints),
with dimension (n × 16) where n is a large number. (n starts at 16777186 and grows from there.)
Following the magic number, the rows of the DAG should be written sequentially into the file, with
no delimiter between rows and each unint32 encoded in little-endian format.

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Tags (1)
0 Kudos
Highlighted
Visitor
Visitor
810 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

hi @mcertosi 

 

Till now, I have generated dag 5 times.

DAG generated by "https://github.com/ethereum/wiki/wiki/Ethash" this link, comes with size 3GB    -- it is a text file contains set of arrays ------- It is not working

shaun's code generate 1GB dag but with different hash. hence, it is useless.

DAG generated by go-ethereum repo, is also 1GB in size but with different hash, it is also not working.

[root@localhost go-ethereum]# ./build/bin/geth makedag 0 ./                   -----------file generated by this code is a binary file

 

Now, I am clue less.

Kindly suggest.

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
792 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

I'm not going to speak to the DAG's correctness at this point. I'd imagine that any random numbers in the correct format would work for what the exercise is trying to illustrate. 

EDIT** There was a bunch of other stuff in this post originally, but I looked at the host code. Are you calling your dag file "dataset" ?

std::ifstream file("../dataset", std::ios::binary | std::ios::ate); 

 // init dag
	std::ifstream file("../dataset", std::ios::binary | std::ios::ate);
	std::streamsize size = file.tellg();
	file.seekg(0, std::ios::beg);
	if (file.read(p_dag, size))
	{
		std::cout << "dag loaded\n";
	} else {
		std::cout << "failed to load dag\n";
		std::cout << "error: only " << file.gcount() << " could be read\n";
		std::cout << "eof: " << file.eof() << "\n";
		std::cout << "fail: " << file.fail() << "\n";
		std::cout << "bad: " << file.bad() << "\n";
	}

Your code is failing here. Can you set a brake point and show me whats going on when your emulation flow reaches this point? 

Regards,

M

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
724 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @mcertosi 

 

Please find the debugger console output [Emulation-HW] below,

 

GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Function "krnl_ethash" not defined.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time
warning: Cannot parse .gnu_debugdata section; LZMA support was disabled at compile time

Temporary breakpoint 2, main (argc=2, argv=0x7fffffffccc8) at ../src/pow.cpp:102
102 if(argc != 2) {
warning: Can not parse XML OS data; XML support was disabled at compile time

 

 

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
713 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

This looks like a GDB bug, or maybe an environment bug. 

Since that's a warning, does the debugger continue if you ask it? 

 

Recall that this error message is not the same as the error message you were seeing in the regular Emulation-hw flow. So this information isn't directly helpful to the error at hand. 

Are you able to understand the host code branch that would bring you to the original error message? 

    // init dag
	std::ifstream file("../dataset", std::ios::binary | std::ios::ate);
	std::streamsize size = file.tellg();
	file.seekg(0, std::ios::beg);

Do you have a file called "dataset" one directory above your working directory? Is the ../ necessary in your application? 

are the stdio libs included in your project? 

That's the only way I see this branch going false, otherwise if you can get an object handle from the file it should work. 

Do you have the permissions of that file set correctly? 

 

There is a forum post with a similar warning message. That post ended up being a GDB bug in the Windows environment that needed a patch to fix, you can read more here and see if it applies to you - https://forums.xilinx.com/t5/Embedded-Development-Tools/SDK-warning/td-p/1011937

 

Regards,

M

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
680 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @mcertosi 

I saw the mentioned post,

It contains patch for windows,

Could you please provide linux patch for the same.

Priyesh Manwatkar
0 Kudos
Highlighted
Visitor
Visitor
670 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

above xml issue resolved by installing *expat* packages.

yum install -y *expat*

Priyesh Manwatkar
0 Kudos
Highlighted
Visitor
Visitor
623 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

hi @m

in below link, I am at building part.
https://developer.xilinx.com/en/articles/busting-fpga-blockchain-myths-part-4.html

Instead of "system", "hardware" tab is visible in vitis.

I am done with the "build all" process, but "Host executable (e.g. ethash.exe or vadd.exe if it was never renamed)" is not visible in vitis explorer or in workspace directory on os.

I got the "FPGA Binary (e.g. binary_container_1.xclbin is the default name)".

After "build all" process, shaun did not ask for run the project,
will "run project" insert the code in u200?

I ran the project, i got the positive output, dag was loaded; but after executing my own software for which i purchased this u200, I got below error.

===============================
Build: linux/release/gnu

XRT build version: 2.5.309
Build hash: 9a03790c11f066a5597b133db737cf4683ad84c8
Build date: 2020-02-24 02:54:37
Git branch: 2019.2_PU2
PID: 10355
UID: 0
[Thu Apr 2 03:42:26 2020]
HOST: localhost.localdomain
EXE: /root/Downloads/ethminer0.18/bin/ethminer
[XRT] ERROR: XILINX_XRT must be set
No OpenCL platforms found
CUDA Error : No CUDA driver found
Error: No usable mining devices found
===============================


Here is the card status:

=====================================
[root@localhost Downloads]# lspci -vd 10ee:
01:00.0 Processing accelerators: Xilinx Corporation Device 5000
Subsystem: Xilinx Corporation Device 000e
Flags: bus master, fast devsel, latency 0
Memory at f2000000 (64-bit, prefetchable) [size=32M]
Memory at f4000000 (64-bit, prefetchable) [size=128K]
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable+ Count=33 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [1c0] #19
Capabilities: [400] Access Control Services
Capabilities: [410] #15
Kernel driver in use: xclmgmt
Kernel modules: xclmgmt

01:00.1 Processing accelerators: Xilinx Corporation Device 5001
Subsystem: Xilinx Corporation Device 000e
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at f0000000 (64-bit, prefetchable) [size=32M]
Memory at f4020000 (64-bit, prefetchable) [size=64K]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
Capabilities: [40] Power Management version 3
Capabilities: [60] MSI-X: Enable+ Count=33 Masked-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [400] Access Control Services
Capabilities: [410] #15
Kernel driver in use: xocl
Kernel modules: xocl
==============================================


==============================================
[root@localhost Downloads]# /opt/xilinx/xrt/bin/xbutil validate
INFO: Found 1 cards

INFO: Validating card[0]: xilinx_u200_xdma_201830_2
INFO: == Starting AUX power connector check:
INFO: == AUX power connector check PASSED
INFO: == Starting PCIE link check:
INFO: == PCIE link check PASSED
INFO: == Starting SC firmware version check:
INFO: == SC firmware version check PASSED
INFO: == Starting verify kernel test:
INFO: == verify kernel test PASSED
INFO: == Starting DMA test:
Host -> PCIe -> FPGA write bandwidth = 8058.25 MB/s
Host <- PCIe <- FPGA read bandwidth = 11072.4 MB/s
INFO: == DMA test PASSED
INFO: == Starting device memory bandwidth test:
...........
Maximum throughput: 52428 MB/s
INFO: == device memory bandwidth test PASSED
INFO: == Starting PCIE peer-to-peer test:
P2P BAR is not enabled. Skipping validation
INFO: == PCIE peer-to-peer test SKIPPED
INFO: == Starting memory-to-memory DMA test:
bank0 -> bank1 M2M bandwidth: 12047.6 MB/s
bank0 -> bank2 M2M bandwidth: 12081.2 MB/s
bank0 -> bank3 M2M bandwidth: 12081.2 MB/s
bank1 -> bank2 M2M bandwidth: 12082.3 MB/s
bank1 -> bank3 M2M bandwidth: 12089.2 MB/s
bank2 -> bank3 M2M bandwidth: 12101.2 MB/s
INFO: == memory-to-memory DMA test PASSED
INFO: Card[0] validated successfully.

INFO: All cards validated successfully.
===================================================


Kindly suggest.

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
616 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

@priyesh 

[XRT] ERROR: XILINX_XRT must be set 

is resolved with sourcing the xrt setup script

$/opt/xilinx/xrt/setup.sh

Are you saying your build process did not create an executable? 

Where is your main function defined? 

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
608 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

 

yes, my build process did not create executable.

I am using linux cent os, what should vitis create .sh file or .exe file

in vitis explorer, there is one .sh file with name binary_container_1.sh

Priyesh Manwatkar
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
588 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

You might have missed some steps in the tutorial. The goal is to create an acceleration kernel combined with a platform - an XCLBIN 

As well as a host executable that uses OpenCL to call the acceleration kernels.

You'll need a exe and an xclbin. 

A .sh file is likely a shell script. It could do anything else. 

 

Please review the blogpost for steps you may have missed. 

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Highlighted
Visitor
Visitor
456 Views
Registered: ‎03-27-2020

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @mcertosi ,

I did the whole procedure again with SDaccel and I got the exe file.

I think there is an issue with vitis 2019.2.

I am done with given procedure but still I am not able to use u200 for mining ethereum.

The application "Ethminer" throwing below error,

======================================

ethminer 0.18.0-rc.0
Build: linux/release/gnu

Unrecognized platform Xilinx
CUDA Error : no CUDA-capable device is detected
Error: No usable mining devices found

======================================

 

Here is the "xbutil list" output

======================================

[root@localhost bin]# /opt/xilinx/xrt/bin/xbutil list
INFO: Found total 1 card(s), 1 are usable
WARNING: The xbutil sub-command list has been deprecated. Please use xbutil scan for equivalent functionality.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System Configuration
OS name: Linux
Release: 3.10.0-1062.18.1.el7.x86_64
Version: #1 SMP Tue Mar 17 23:49:17 UTC 2020
Machine: x86_64
Model: Z370M D3H
CPU cores: 12
Memory: 15763 MB
Glibc: 2.22.90
Distribution: CentOS Linux 7 (Core)
Now: Fri Apr 3 17:21:22 2020
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
XRT Information
Version: 2.5.309
Git Hash: 9a03790c11f066a5597b133db737cf4683ad84c8
Git Branch: 2019.2_PU2
Build Date: 2020-02-24 02:54:37
XOCL: 2.5.309,9a03790c11f066a5597b133db737cf4683ad84c8
XCLMGMT: 2.5.309,9a03790c11f066a5597b133db737cf4683ad84c8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[0] 0000:01:00.1 xilinx_u200_xdma_201830_2(ID=0x5d1211e8) user(inst=129)

======================================

 

Could you please confirm from shaun that,  is this article for creating ethereum mining bitstream?

 

Thanks in advanced.

Priyesh Manwatkar
ethminer output.png
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
454 Views
Registered: ‎10-19-2015

Re: Not able to generate DAG and calculate data bytes for ethereum for alveo u200

Hi @priyesh 

Yes, the article was written for the 2019.1 tools.

The article ends with running the this command

./ethash_v1_u200.exe binary_container_1.xclbin

The next thing a user would have to do is integrate that command into their ethereum application. 

Can you find where "Ethminer" calls the ethash function? I think that's what you want to replace with your accelerated program. 

Regards,

M

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos