{"action":"created","issue":{"url":"https://api.github.com/repos/andersbll/cudarray/issues/10","labels_url":"https://api.github.com/repos/andersbll/cudarray/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/andersbll/cudarray/issues/10/comments","events_url":"https://api.github.com/repos/andersbll/cudarray/issues/10/events","html_url":"https://github.com/andersbll/cudarray/issues/10","id":57102282,"number":10,"title":"ImportError: libcudarray.so: cannot open shared object file","user":{"login":"wielandbrendel","id":6177693,"avatar_url":"https://avatars.githubusercontent.com/u/6177693?v=3","gravatar_id":"","url":"https://api.github.com/users/wielandbrendel","html_url":"https://github.com/wielandbrendel","followers_url":"https://api.github.com/users/wielandbrendel/followers","following_url":"https://api.github.com/users/wielandbrendel/following{/other_user}","gists_url":"https://api.github.com/users/wielandbrendel/gists{/gist_id}","starred_url":"https://api.github.com/users/wielandbrendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wielandbrendel/subscriptions","organizations_url":"https://api.github.com/users/wielandbrendel/orgs","repos_url":"https://api.github.com/users/wielandbrendel/repos","events_url":"https://api.github.com/users/wielandbrendel/events{/privacy}","received_events_url":"https://api.github.com/users/wielandbrendel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-09T22:46:42Z","updated_at":"2015-02-13T15:12:23Z","closed_at":null,"body":"Hi,\r\nfirst of all: amazing work you are doing with cudarray! I like the concept quite a lot. The installation runs smoothly (after updating Cython), except that I can't use the CUDA backend. Every time I try, I get the following error message,\r\n\r\n```python\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-4-342f252c3bce> in <module>()\r\n----> 1 import cudarray as ca\r\n      2 a = ca.random.uniform(size=(100, 10))\r\n      3 for _ in range(1000):\r\n      4     ca.softmax(a)\r\n\r\n/usr/local/lib/python2.7/dist-packages/cudarray-0.1-py2.7-linux-x86_64.egg/cudarray/__init__.py in <module>()\r\n     28         try:\r\n     29             from .base import *\r\n---> 30             from .cudarray import *\r\n     31             from .linalg import *\r\n     32             from .elementwise import *\r\n\r\n/usr/local/lib/python2.7/dist-packages/cudarray-0.1-py2.7-linux-x86_64.egg/cudarray/cudarray.py in <module>()\r\n      1 import numpy as np\r\n      2 from .wrap.array_data import ArrayData\r\n----> 3 from . import elementwise\r\n      4 from . import base\r\n      5 from . import helpers\r\n\r\n/usr/local/lib/python2.7/dist-packages/cudarray-0.1-py2.7-linux-x86_64.egg/cudarray/elementwise.py in <module>()\r\n      1 import numpy as np\r\n      2 import cudarray\r\n----> 3 from .wrap import elementwise\r\n      4 from . import helpers\r\n      5 \r\n\r\nImportError: libcudarray.so: cannot open shared object file: No such file or directory\r\n```\r\n\r\nThe file exists at /usr/local/lib but adding it to the standard search paths didn't help. Any ideas?\r\n\r\nAnd while we are at it, just a short question on cudarray: all operations are done on the GPU, so there is no back-and-forth copy between host and device, right?\r\n\r\nThanks a lot in advance!\r\nWieland"},"comment":{"url":"https://api.github.com/repos/andersbll/cudarray/issues/comments/74267984","html_url":"https://github.com/andersbll/cudarray/issues/10#issuecomment-74267984","issue_url":"https://api.github.com/repos/andersbll/cudarray/issues/10","id":74267984,"user":{"login":"wielandbrendel","id":6177693,"avatar_url":"https://avatars.githubusercontent.com/u/6177693?v=3","gravatar_id":"","url":"https://api.github.com/users/wielandbrendel","html_url":"https://github.com/wielandbrendel","followers_url":"https://api.github.com/users/wielandbrendel/followers","following_url":"https://api.github.com/users/wielandbrendel/following{/other_user}","gists_url":"https://api.github.com/users/wielandbrendel/gists{/gist_id}","starred_url":"https://api.github.com/users/wielandbrendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wielandbrendel/subscriptions","organizations_url":"https://api.github.com/users/wielandbrendel/orgs","repos_url":"https://api.github.com/users/wielandbrendel/repos","events_url":"https://api.github.com/users/wielandbrendel/events{/privacy}","received_events_url":"https://api.github.com/users/wielandbrendel/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T15:12:23Z","updated_at":"2015-02-13T15:12:23Z","body":"Alright, I solved it myself. The solution was to set the LD_LIBRARY_PATH to /usr/local/lib. I had done this before posting, however I missed to complete restart ipython (instead of just the ipython kernel).\r\n\r\nFor those interested, here is a short excerpt from a Dockerfile to install cudarray:\r\n\r\n```\r\nENV INSTALL_PREFIX /usr/local\r\nENV CUDA_PREFIX /usr/local/cuda-6.5\r\nENV CUDNN_ENABLED 0\r\nENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH\r\n\r\n# upgrade cython to latest version\r\nRUN pip2.7 install --upgrade cython\r\n\r\nRUN cd /opt/ && \\\r\n    git clone --recursive https://github.com/andersbll/cudarray.git\r\n\r\nRUN cd /opt/cudarray && \\\r\n    make && \\\r\n    make install && \\\r\n    python2 setup.py install\r\n```"}}