Closed WKrauze closed 3 years ago
i have the same problem
The solution to this problem can be found on Slack channel. To cite:
I think its the order in which the libraries are loaded. Python 3 and some of the wheels use a standard library that conflicts with ArrayFire's standard library sometimes.
And the solution: write in terminal:
LD_PRELOAD=<full_path_to_libafcuda> python your_python.py
For example:
LD_PRELOAD=/opt/arrayfire/lib64/libafcuda.so python3 helloworld.py
If you want to add this environment variable in PyCharm, follow the instructions given here. For me this solves the problem.
I have a problem with arrayfire-python. I followed all installation instructions, including adding directories to LD_LIBRARY_PATH:
$ echo $LD_LIBRARY_PATH
/opt/arrayfire/lib64/::/opt/cuda/lib64/:/opt/cuda/nvvm/lib64/
In
/etc/ld.so.conf.d/arrayfire.conf
I have/opt/arrayfire/lib64
However, when I try to run helloworld.py from examples, I get:
When I am in the python console and I change backend to CPU I get:
when I change back to CUDA I get:
So for me it looks like arrayfire correctly recognizes CPU and CUDA. I found similar problem here: https://groups.google.com/g/arrayfire-users/c/_524PBvEvGw?pli=1 however it was not solved. Also. when I try to run another code for which I installed arrayfire, I get this error:
which, as I believe, is related with the same issue. Additional info: I am using Anaconda, Python 3.8.5 Linux Manjaro 20.2.1