shinmorino / sqaod

Solvers/annealers for simulated quantum annealing on CPU and CUDA(NVIDIA GPU).
https://github.com/shinmorino/sqaod/wiki
Other
81 stars 21 forks source link

Library Path and Typo in #68

Open Btrainwilson opened 4 years ago

Btrainwilson commented 4 years ago

Found 2 issues while installing. First is that the build path doesn't take into account $LD_LIBRARY_PATH. It assumes /usr/local/lib is the correct path. Tried to build on google colab and the package couldn't find the following files. I had to copy them. Here's the code. Note sure how to fix it in the build scripts. !cp /usr/local/lib/libsqaodc.la $LD_LIBRARY_PATH !cp /usr/local/lib/libsqaodc.so.1 $LD_LIBRARY_PATH !cp /usr/local/lib/libsqaodc.so.1.0.0 $LD_LIBRARY_PATH !cp /usr/local/lib/libsqaodc_cuda.la $LD_LIBRARY_PATH !cp /usr/local/lib/libsqaodc_cuda.so.1 $LD_LIBRARY_PATH !cp /usr/local/lib/libsqaodc_cuda.so.1.0.0 $LD_LIBRARY_PATH

Second issue is to change line 5 of sqaod/init.py to: version = sqaodpy_version

yannick-couzinie commented 1 year ago

This comment probably has no use for you anymore, and you might have realized in the meantime but I think your first problem would be solved if you put your target library path (or the parent directory thereof rather) as a prefix argument to make your .configure command, i.e. configure --prefix=$LD_LIBRARY_PATH [other commands such as --enable-cuda<=cuda-prefix> and such] this of course assumes that your $LD_LIBRARY_PATH is a single path and not a colon (:) separated list of paths as is usually the case.

For your second problem Was able to reproduce it when wrongly configuring my environment and the python library would find the local init.py before the one from the installed library, but in the library I do not think this is a problem.