Cytnx-dev / Cytnx

Project Cytnx, A Cross-section of Python & C++,Tensor network library
Apache License 2.0
35 stars 13 forks source link

Symbol not found: __ZN5cytnx6linalg4ExpHERKNS_6TensorERKdS5_ #9

Closed pcchen closed 4 years ago

pcchen commented 4 years ago

I tried various ways to build, always run into this error.

kaihsin commented 4 years ago

Hi, Pochung

Thanks so much for open the issue. Could you pull the latest version now and try is again, there are major changes done recently by me.... sorry for that.

pcchen commented 4 years ago

How do you build the python extension?

I do something like make build cd build cmake .. make (which build the wrapper)

or python setup.py build_ext -i (but I think this is also cmake based?)

I figure out that you need to add/modify CMakeLists for the new functions you add recently. After some minor modification, I can build and load the wrapper OK.

I will write some comment about this later today pc

modified:   ../src/CMakeLists.txt
modified:   ../src/linalg/CMakeLists.txt
modified:   ../src/utils/utils_internal_cpu/CMakeLists.txt

On Mar 17, 2020, at 12:05, Kai-Hsin Wu notifications@github.com wrote:

Hi, Pochung

Thanks so much for open the issue. Could you pull the latest version now and try is again, there are major changes done recently by me.... sorry for that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kaihsin/Cytnx/issues/9#issuecomment-599866858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXBYAYB7Q23FDJLKB4JULTRH3ZIRANCNFSM4LMM7ABA.


陳柏中 Pochung Chen Professor Department of Physics National Tsing Hua University EMail: pcchen@phys.nthu.edu.tw mailto:pcchen@phys.nthu.edu.tw URL:http://qubit.phys.nthu.edu.tw/~pcchen/ http://qubit.phys.nthu.edu.tw/~pcchen/

kaihsin commented 4 years ago

I haven't update the cmake part, so probably it will faild.... so right now I only tested via plain make. Maybe that's the issue. I will try to do cmake update later

1) make the library $make -Bj4 2) make the python wrapper $make pyobj

kaihsin commented 4 years ago

I've fix the cmake install error. It is missing the following new added files in CMakeLists.txt

  1. utils/Complexmem_cpu.cpp (.hpp) ,utils/cuComplexmem_gpu.hpp (.cu)
  2. linalg/ExpH.cpp
  3. random/* Please see the latest push 52d5082be343b0304ac77dd9b1a8a4791dac6d4e
pcchen commented 4 years ago

I think it is working :) I will port more examples soon.

On Mar 17, 2020, at 13:32, Kai-Hsin Wu notifications@github.com wrote:

I've fix the cmake install error. It is missing the following new added files in CMakeLists.txt

utils/Complexmem_cpu.cpp (.hpp) ,utils/cuComplexmem_gpu.hpp (.cu) linalg/ExpH.cpp Please see the latest push https://github.com/kaihsin/Cytnx/tree/52d5082be343b0304ac77dd9b1a8a4791dac6d4e <x-msg://15/url> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kaihsin/Cytnx/issues/9#issuecomment-599885935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXBYA56PXJ3QMAXB7B4UOLRH4DOXANCNFSM4LMM7ABA.


陳柏中 Pochung Chen Professor Department of Physics National Tsing Hua University EMail: pcchen@phys.nthu.edu.tw mailto:pcchen@phys.nthu.edu.tw URL:http://qubit.phys.nthu.edu.tw/~pcchen/ http://qubit.phys.nthu.edu.tw/~pcchen/

kaihsin commented 4 years ago

Great! Thanks! I am closing the issue.

pcchen commented 4 years ago

我想建議一下使用 release

https://help.github.com/en/enterprise/2.16/user/github/administering-a-repository/creating-releases https://help.github.com/en/enterprise/2.16/user/github/administering-a-repository/creating-releases

把比較 stable 的特定 commit 先 tag 然後 release。這樣使用者可以只先專注在這些版本。

例外,請問你最近 Tensor (含)以下的東西還會有比較大的變動嗎?還是你只會改 Extension (含)以上的東西?

Thanks pc

On Mar 17, 2020, at 20:23, Kai-Hsin Wu notifications@github.com wrote:

Great! Thanks! I am closing the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kaihsin/Cytnx/issues/9#issuecomment-600041454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXBYA2WPTNKEGHVGJGJDWDRH5TTHANCNFSM4LMM7ABA.


陳柏中 Pochung Chen Professor Department of Physics National Tsing Hua University EMail: pcchen@phys.nthu.edu.tw mailto:pcchen@phys.nthu.edu.tw URL:http://qubit.phys.nthu.edu.tw/~pcchen/ http://qubit.phys.nthu.edu.tw/~pcchen/

kaihsin commented 4 years ago

Hi Pochung,

Thanks! I've create a v0.5.0 pre-release tag for the latest stable push.

For Tensor, 1) There should not be significant API change in the future (some argument order might change slightly in C++ side in order to make consistent with python binding.) But the whole design structure will not be change. 2) More cytnx.linalg functions will be added later and will be optimize (both CPU part and GPU part) at the internal level, so API won't change. 3) cytnx_extension is now in experiement stage, so it might be change a bit, but overall design should not change dramatically