{
  "id": 15496,
  "title": "Help:using Lasagne in Ec2, Theano unable to detect GPU",
  "url": "/competitions/diabetic-retinopathy-detection/discussion/15496",
  "author_name": "",
  "post_date": "2015-07-24T02:34:35.740Z",
  "votes": null,
  "comment_count": 2,
  "views": 7045,
  "content": "<p>This could well be pretty late for this competition but I have been trying to use lasagne for this competition with no luck (and I am fairly new to using gpu in ec2) . \nI followed the instructions from here: <a href=\"http://markus.com/install-theano-on-aws/\">http://markus.com/install-theano-on-aws/</a>  to install Cuda and theano in g2x ec2 instance followed by \nsudo apt-get install python-pandas\nsudo pip install sklearn</p>\n\n<p>and then to install lasagne and nolearn I followed Daniel Nouri's : <a href=\"http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/\">http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/</a>  </p>\n\n<p>Everytime I run the mnist.py, I get this message: </p>\n\n<p>ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\nERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\nWARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available \nWARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available </p>\n\n<p>and then on the cpu is used. I am unable to fix this despite of updating the path: <br>\n$ echo -e &quot;\\nexport PATH=/usr/local/cuda/bin:$PATH\\n\\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64&quot; &gt;&gt; .bashrc\n$ source ~/.bashrc</p>\n\n<p>I did manage to use the gpu once (I followed the same steps as above), but I never managed to make use of the gpu after that.</p>\n\n<p>I am hoping that I am missing out something very simple.Any help/pointers is greatly appreciated. </p>\n\n<p>Thank you!</p>",
  "messages": [
    {
      "id": "86737",
      "postDate": "07/24/2015 02:34:35",
      "content": "<p>This could well be pretty late for this competition but I have been trying to use lasagne for this competition with no luck (and I am fairly new to using gpu in ec2) . \nI followed the instructions from here: <a href=\"http://markus.com/install-theano-on-aws/\">http://markus.com/install-theano-on-aws/</a>  to install Cuda and theano in g2x ec2 instance followed by \nsudo apt-get install python-pandas\nsudo pip install sklearn</p>\n\n<p>and then to install lasagne and nolearn I followed Daniel Nouri's : <a href=\"http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/\">http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/</a>  </p>\n\n<p>Everytime I run the mnist.py, I get this message: </p>\n\n<p>ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\nERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\nWARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available \nWARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available </p>\n\n<p>and then on the cpu is used. I am unable to fix this despite of updating the path: <br>\n$ echo -e &quot;\\nexport PATH=/usr/local/cuda/bin:$PATH\\n\\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64&quot; &gt;&gt; .bashrc\n$ source ~/.bashrc</p>\n\n<p>I did manage to use the gpu once (I followed the same steps as above), but I never managed to make use of the gpu after that.</p>\n\n<p>I am hoping that I am missing out something very simple.Any help/pointers is greatly appreciated. </p>\n\n<p>Thank you!</p>",
      "rawMarkdown": "This could well be pretty late for this competition but I have been trying to use lasagne for this competition with no luck (and I am fairly new to using gpu in ec2) . \r\nI followed the instructions from here: http://markus.com/install-theano-on-aws/  to install Cuda and theano in g2x ec2 instance followed by \r\nsudo apt-get install python-pandas\r\nsudo pip install sklearn\r\n\r\nand then to install lasagne and nolearn I followed Daniel Nouri's : http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/  \r\n\r\nEverytime I run the mnist.py, I get this message: \r\n\r\nERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\r\nERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\r\nWARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available \r\nWARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available \r\n\r\nand then on the cpu is used. I am unable to fix this despite of updating the path:  \r\n$ echo -e \"\\nexport PATH=/usr/local/cuda/bin:$PATH\\n\\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64\" >> .bashrc\r\n$ source ~/.bashrc\r\n\r\nI did manage to use the gpu once (I followed the same steps as above), but I never managed to make use of the gpu after that.\r\n\r\nI am hoping that I am missing out something very simple.Any help/pointers is greatly appreciated. \r\n\r\nThank you!",
      "votes": null
    },
    {
      "id": "86773",
      "postDate": "07/24/2015 07:59:14",
      "content": "<p>You should first check if those files (libcublas.so.7.0 etc.) are really there (in /usr/local/cuda/lib64 or /usr/local/cuda-7.0/lib64 or /usr/local/cuda-7.5/lib64 or similar). If so, then try using <code>sudo ldconfig /usr/local/cuda-7.5/lib64</code> to refresh the shared libs cache for that specific dir. Then try importing theano again.</p>",
      "rawMarkdown": "You should first check if those files (libcublas.so.7.0 etc.) are really there (in /usr/local/cuda/lib64 or /usr/local/cuda-7.0/lib64 or /usr/local/cuda-7.5/lib64 or similar). If so, then try using `sudo ldconfig /usr/local/cuda-7.5/lib64` to refresh the shared libs cache for that specific dir. Then try importing theano again.",
      "votes": null
    },
    {
      "id": "86799",
      "postDate": "07/24/2015 12:22:31",
      "content": "<p>Thank you so much Jeffrey! ldconfig did the trick. :)</p>",
      "rawMarkdown": "Thank you so much Jeffrey! ldconfig did the trick. :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 86773,
      "author_name": "jeffreydf",
      "author_url": "",
      "post_date": "07/24/2015 07:59:14",
      "content": "<p>You should first check if those files (libcublas.so.7.0 etc.) are really there (in /usr/local/cuda/lib64 or /usr/local/cuda-7.0/lib64 or /usr/local/cuda-7.5/lib64 or similar). If so, then try using <code>sudo ldconfig /usr/local/cuda-7.5/lib64</code> to refresh the shared libs cache for that specific dir. Then try importing theano again.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 86799,
      "author_name": "srikiyer",
      "author_url": "",
      "post_date": "07/24/2015 12:22:31",
      "content": "<p>Thank you so much Jeffrey! ldconfig did the trick. :)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "86737": "This could well be pretty late for this competition but I have been trying to use lasagne for this competition with no luck (and I am fairly new to using gpu in ec2) . \r\nI followed the instructions from here: http://markus.com/install-theano-on-aws/  to install Cuda and theano in g2x ec2 instance followed by \r\nsudo apt-get install python-pandas\r\nsudo pip install sklearn\r\n\r\nand then to install lasagne and nolearn I followed Daniel Nouri's : http://danielnouri.org/notes/2014/12/17/using-convolutional-neural-nets-to-detect-facial-keypoints-tutorial/  \r\n\r\nEverytime I run the mnist.py, I get this message: \r\n\r\nERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\r\nERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: libcublas.so.7.0: cannot open shared object file: No such file or directory\r\nWARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available \r\nWARNING:theano.sandbox.cuda:CUDA is installed, but device gpu is not available \r\n\r\nand then on the cpu is used. I am unable to fix this despite of updating the path:  \r\n$ echo -e \"\\nexport PATH=/usr/local/cuda/bin:$PATH\\n\\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64\" >> .bashrc\r\n$ source ~/.bashrc\r\n\r\nI did manage to use the gpu once (I followed the same steps as above), but I never managed to make use of the gpu after that.\r\n\r\nI am hoping that I am missing out something very simple.Any help/pointers is greatly appreciated. \r\n\r\nThank you!",
    "86773": "You should first check if those files (libcublas.so.7.0 etc.) are really there (in /usr/local/cuda/lib64 or /usr/local/cuda-7.0/lib64 or /usr/local/cuda-7.5/lib64 or similar). If so, then try using `sudo ldconfig /usr/local/cuda-7.5/lib64` to refresh the shared libs cache for that specific dir. Then try importing theano again.",
    "86799": "Thank you so much Jeffrey! ldconfig did the trick. :)"
  },
  "source": "meta"
}