arrayfire-python conflict with pycuda on anaconda with Linux

未關閉
#191 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
anaconda, linux, python

研究方向

此失敗透過 arrayfire/tests/simple/array_test.py 和 arrayfire/tests/simple/_util.py 回報,格式化位於 arrayfire/array.py,錯誤處理位於 arrayfire/util.py。重現安裝了 pycuda 的 Anaconda/Linux 設定,然後將其與 separate-PYTHONPATH 這個替代方案進行比較。當 simple 測試不需要該替代方案即可通過,且相依性互動已記錄或修正時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

Hi,

I am using anaconda on linux, I have been previously using arrayfire on windows fine. I installed latest arrayfire on the Linux OS.. The error was

ERROR:root:Traceback (most recent call last):
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/_util.py", line 32, in run
    test(verbose)
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/array_test.py", line 26, in simple_array
    display_func(b)
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/tests/simple/_util.py", line 50, in print_func_impl
    _print_log += str(arg) + '\n'
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/array.py", line 1281, in __str__
    return self._get_metadata_str(dims=False) + self._as_str()
  File "/home/sabih/anaconda3/lib/python3.6/site-packages/arrayfire/array.py", line 1301, in _as_str
    safe_call(be.af_array_to_string(c_pointer(arr_str), "", self.arr, 4, True))
  File "/home/sabih/anaconda3/lib/python3.6/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<char>]
In file src/api/c/print.cpp:

After spending a day trying to think as to what the problem could be, I discovered that the problem is due to conflict with the install of pycuda, as soon as I removed pycuda, the arrayfire tests passed. The different version of pycuda give the same error.

Now I solved the issue by installing pycuda in a separate folder and adding that to the PYTHONPATH instead of the default in anaconda.

主要語言
Python
星號
422
分支
63
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

arrayfire/arrayfire-python 的其他 Issue

查看 arrayfire/arrayfire-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。