Skip to content

RuntimeError: Could not load any ArrayFire libraries #229

Open

Description

@luckydog1996

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.

Activity

  1. syurkevi commented on May 15, 2020

    @syurkevi
    Contributor

    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: http://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...

  2. luckydog1996 commented on May 15, 2020

    @luckydog1996
    Author

    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)

  3. WKrauze commented on Jan 14, 2021

    @WKrauze

    I believe this can be combined with Issue #248 , since the error messages are the same.

  4. WKrauze commented on Jan 22, 2021

    @WKrauze

    The solution to this problem is given in #248 . I believe this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions