Cytnx-dev / Cytnx

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

Use git submodule to handle external dependence #454

Open pcchen opened 2 weeks ago

pcchen commented 2 weeks ago

I want to discuss the possibility of using git submodule to handle external dependence. There are three main dependences

I find that, on Ubuntu Linux (2x.x), if I use apt to install libopenblas, it does not contain lapacke.h. If you also install liblapacke-dev, then you can compile cytnx. But when you import cytnx, it will complain undefined symbol: LAPACKE_dstev. Finally I find that the libopenblas.so does not have LAPACKE_ symbols.

If you download, compile, and install OpenBLAS, say in /opt/OpenBLAS. (It is easy). Then your compiled libopenblas.so DO have LAPACKE_* symbols and you have head file lapacke.h in /opt/OpenBLAS/include.

Since openblas and pybind11 are not difficult to install. It might be a good idea to use git submodule to handle them to have better control, consistence. and is easier to debug the build process.

In https://github.com/tensor4all/xfac , they use git submodule to handle pybind11 dependence.

Also, since we only need a very small part of the boost, mabye we can only include this small part as a submodule?

jeffry1829 commented 2 weeks ago

If I recall correctly, there has been attempt to do that, I'll investigate it