Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I How do I run the.py file in python/examples/? #48

Open
tanghao123th opened this issue Oct 25, 2021 · 1 comment
Open

How do I How do I run the.py file in python/examples/? #48

tanghao123th opened this issue Oct 25, 2021 · 1 comment

Comments

@tanghao123th
Copy link

Excuse me,when I run the.py file in python/examples/,I got a fail.
For example,I type the python contraction.py command to run contraction.py.
The result is as follows:
A1 shape: (2, 3)
B1 shape: (3, 4)
Traceback (most recent call last):
File "contraction.py", line 37, in
test_exatn()
File "contraction.py", line 18, in test_exatn
exatn.createTensor('C1', [2, 4], 0.0)
AttributeError: module 'exatn' has no attribute 'createTensor'

What should I do?

@DmitryLyakh
Copy link
Member

I am not sure, I can run it fine on my laptop with python3:

python3 ./contraction.py
A1 shape: (2, 3)
B1 shape: (3, 4)
C1 shape: (2, 4)
D1 shape: (2, 4)
NumPy result c1 = a1 * b1:
[[1. 0. 3. 0.]
[0. 2. 0. 4.]]
ExaTN result c1 = a1 * b1:
[[1. 0. 3. 0.]
[0. 2. 0. 4.]]
#MSG(TAL-SH::CP-TAL): Statistics on CPU:
Number of Flops processed : 0.48000000000000D+02
Average GEMM GFlop/s rate : 0.21155644902783D-04
Number of Bytes permuted : 0.22400000000000D+03
Average permute GB/s rate : 0.77701273724200D-03
Average contract GFlop/s rate: 0.18770919285867D-04
#END_MSG

Maybe, check you build configuration and make sure you set
"export PYTHONPATH=$PYTHONPATH:$HOME/.exatn"
and use Python3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants