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

RuntimeError: Could not load any ArrayFire libraries #229

Open
luckydog1996 opened this issue May 15, 2020 · 2 comments
Open

RuntimeError: Could not load any ArrayFire libraries #229

luckydog1996 opened this issue May 15, 2020 · 2 comments

Comments

@luckydog1996
Copy link

@luckydog1996 luckydog1996 commented May 15, 2020

I have include export LD_LIBRARY_PATH=/home/ztzhao/Downloads/arrayfire/lib64:$LD_LIBRARY_PATH in my ~/.bashrc, but when I want to run python -m arrayfire.tests it still can not load arrayfire libraries.

@syurkevi
Copy link
Contributor

@syurkevi syurkevi commented May 15, 2020

Are you using the cuda backend? If so you may also need to add the cuda paths. For example:
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/nvvm/lib64/:/opt/arrayfire/lib64/:$LD_LIBRARY_PATH
More details here: https://github.com/arrayfire/arrayfire-python/wiki
If that doesn't help, can you show the specific error message you are seeing? This may be better suited for the arrayfire-org slack channel...

@luckydog1996
Copy link
Author

@luckydog1996 luckydog1996 commented May 15, 2020

After change I run python -m arrayfire.tests, it gives different error:
(base) ztzhao@cw1:~$ python -m arrayfire.tests
Simple algorithm: FAILED

ERROR:root:Traceback (most recent call last):
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/_util.py", line 32, in run
test(verbose)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/algorithm.py", line 20, in simple_algorithm
af.eval(k)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/device.py", line 218, in eval
__eval(*args)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/device.py", line 168, in __eval
safe_call(backend.get().af_eval(args[0].arr))
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function cuda::Kernel cuda::buildKernel(int, const string&, const string&, const std::vector<std::basic_string >&, bool)
In file src/backend/cuda/nvrtc/cache.cpp:

Simple arith: FAILED
arrayfire.Array()
Type: float

[

ERROR:root:Traceback (most recent call last):
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/_util.py", line 32, in run
test(verbose)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/arith.py", line 21, in simple_arith
display_func(b)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/_util.py", line 50, in print_func_impl
_print_log += str(arg) + '\n'
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/array.py", line 1300, in str
return self._get_metadata_str(dims=False) + self._as_str()
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/array.py", line 1320, in _as_str
safe_call(be.af_array_to_string(c_pointer(arr_str), "", self.arr, 4, True))
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function void print(const char*, af_array, int, std::ostream&, bool) [with T = float; af_array = void*; std::ostream = std::basic_ostream]
In file src/api/c/print.cpp:

Simple array: FAILED
arrayfire.Array()
Type: float

[
arrayfire.Array()
Type: float

[
arrayfire.Array()
Type: float

[
(3,)

ERROR:root:Traceback (most recent call last):
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/_util.py", line 32, in run
test(verbose)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/array_test.py", line 26, in simple_array
display_func(b)
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/tests/simple/_util.py", line 50, in print_func_impl
_print_log += str(arg) + '\n'
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/array.py", line 1300, in str
return self._get_metadata_str(dims=False) + self._as_str()
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/array.py", line 1320, in _as_str
safe_call(be.af_array_to_string(c_pointer(arr_str), "", self.arr, 4, True))
File "/home/ztzhao/anaconda3/lib/python3.7/site-packages/arrayfire/util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function void print(const char*, af_array, int, std::ostream&, bool) [with T = int; af_array = void*; std::ostream = std::basic_ostream]
In file src/api/c/print.cpp:

Segmentation fault (core dumped)

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.