Set up GPU for chainer in OSx El Capitan.

I enjoyed a UGM that held on Nov. 5, 6 and hope participants also enjoyed the meeting.

One of the topics of the meeting was “Deep Learning”(???).
I introduced about python library for deep learning called ‘chainer’ .

I presented my challenge to build model for QSAR, using chainer but results were ….(Hahaha)
Chainer is very powerful library, but I have one problem to use chainer.
The problem was that my environment(OSx El Capitan) can’t use GPU from chainer.
I searched google or asked developer to solve it.
And now, I solved the problem!
It depend on OS version.
New Mac OS El capitan can’t over write DYLD_LIBRARY_PATH!
So, when I added dyld_library_path of cuda to .bashrc, it was not reflected!
The solution of this problem was very simple.
Make all symbolic-links to /usr/local/lib .
So type following command from terminal (I used bash).

iwatobipen$ ln -s /usr/local/cuda/lib/* /usr/local/lib

That’s all.
It took long time to solve it…
Now I try to make QSAR model using DL with GPU.

FYI.
User who use mac.
CUDA can install using homebrew (Very simple way to install cuda).
Chainer and chainer-cuda-deps can install using pip.
So, I recommend using pyenv to develop your own environment.

Mishima.syk will be held on 12 Dec.
Don’t miss it ! 😉
http://connpass.com/event/22280/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s