Discussion:
[theano-users] RuntimeError: Mixed dnn version. The header is version 5105 while the library is version 5110.
Robert Lee
2017-04-18 03:30:03 UTC
Permalink
I'm trying to get theano to work with keras. My program runs fine with
tensorflow but when I switch to theano I get the above error message. My
theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jesse Livezey
2017-04-18 04:19:00 UTC
Permalink
Sounds like the cudnn header and libraries are not consistent. When you
install cudnn, did you move all of the files into the correct cuda folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine with
tensorflow but when I switch to theano I get the above error message. My
theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Lee
2017-04-18 14:52:55 UTC
Permalink
Yes I copied the cudnn files using the following two commands:
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/

When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When you
install cudnn, did you move all of the files into the correct cuda folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine with
tensorflow but when I switch to theano I get the above error message. My
theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-04-19 18:01:31 UTC
Permalink
If after that, you still have the problem, search in your filesystem file
like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.

Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When you
install cudnn, did you move all of the files into the correct cuda folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine with
tensorflow but when I switch to theano I get the above error message. My
theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert
2017-04-20 22:07:37 UTC
Permalink
I come from a Windows environment so I'm not familiar at all with the
details of linux under the hood. So I chose Anaconda Navigator since it
makes installing packages and managing environments a lot easier.

I did a search for 'cudnn.h' and 'libcudnn.so' and I did find those
filenames in some anaconda directories.
There is one cudnn.h in home/robert/anaconda3/pkgs/cudnn-5.1-0/include,
this is not the only one.
There is one libcudnn.so in home/robert/anaconda3/pkgs/cudnn-5.1-0/lib,
this is not the only one.
These are files installed by anaconda and they are in more than one place.
After I had installed cuda I copied the cudnn files using the commands:
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/

The revision given in the cudnn.h file that I copied using the command
above is 5.1.5, but the revision that anaconda has in it's directories is
5.1.10. It seems that anaconda actually has these files as part of it's
package, and they are causing the conflict.

In case it's useful, the following text is from the bottom of my .bashrc
file:

# added by Anaconda3 4.3.1 installer
export PATH="/home/robert/anaconda3/bin:$PATH"

# for cuda
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH

# for cudnn
export LIBRARY_PATH=/usr/local/cuda/lib64

The first export was added by the anaconda installer, and the other two
were added by me after installing cuda.

Do you see any way to fix the problem?
Post by Frédéric Bastien
If after that, you still have the problem, search in your filesystem file
like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.
Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When you
install cudnn, did you move all of the files into the correct cuda folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine with
tensorflow but when I switch to theano I get the above error message. My
theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Klachko
2017-04-27 22:36:23 UTC
Permalink
I had the same problem, and I solved it by overwriting all versions of the
files I could find, with the latest version. Also, I used CuDNN v6 with the
latest bleeding edge Theano, and it seems to work fine.
Post by Robert
I come from a Windows environment so I'm not familiar at all with the
details of linux under the hood. So I chose Anaconda Navigator since it
makes installing packages and managing environments a lot easier.
I did a search for 'cudnn.h' and 'libcudnn.so' and I did find those
filenames in some anaconda directories.
There is one cudnn.h in home/robert/anaconda3/pkgs/cudnn-5.1-0/include,
this is not the only one.
There is one libcudnn.so in home/robert/anaconda3/pkgs/cudnn-5.1-0/lib,
this is not the only one.
These are files installed by anaconda and they are in more than one place.
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
The revision given in the cudnn.h file that I copied using the command
above is 5.1.5, but the revision that anaconda has in it's directories is
5.1.10. It seems that anaconda actually has these files as part of it's
package, and they are causing the conflict.
In case it's useful, the following text is from the bottom of my .bashrc
# added by Anaconda3 4.3.1 installer
export PATH="/home/robert/anaconda3/bin:$PATH"
# for cuda
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
# for cudnn
export LIBRARY_PATH=/usr/local/cuda/lib64
The first export was added by the anaconda installer, and the other two
were added by me after installing cuda.
Do you see any way to fix the problem?
Post by Frédéric Bastien
If after that, you still have the problem, search in your filesystem file
like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.
Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When you
install cudnn, did you move all of the files into the correct cuda folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine
with tensorflow but when I switch to theano I get the above error message.
My theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert
2017-04-29 02:59:57 UTC
Permalink
Michael your post gave me the idea to install the version of cudnn that
matches the error message. It appears to have worked. Thanks a lot for
responding.
Post by Michael Klachko
I had the same problem, and I solved it by overwriting all versions of the
files I could find, with the latest version. Also, I used CuDNN v6 with the
latest bleeding edge Theano, and it seems to work fine.
Post by Robert
I come from a Windows environment so I'm not familiar at all with the
details of linux under the hood. So I chose Anaconda Navigator since it
makes installing packages and managing environments a lot easier.
I did a search for 'cudnn.h' and 'libcudnn.so' and I did find those
filenames in some anaconda directories.
There is one cudnn.h in home/robert/anaconda3/pkgs/cudnn-5.1-0/include,
this is not the only one.
There is one libcudnn.so in home/robert/anaconda3/pkgs/cudnn-5.1-0/lib,
this is not the only one.
These are files installed by anaconda and they are in more than one
place. After I had installed cuda I copied the cudnn files using the
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
The revision given in the cudnn.h file that I copied using the command
above is 5.1.5, but the revision that anaconda has in it's directories is
5.1.10. It seems that anaconda actually has these files as part of it's
package, and they are causing the conflict.
In case it's useful, the following text is from the bottom of my .bashrc
# added by Anaconda3 4.3.1 installer
export PATH="/home/robert/anaconda3/bin:$PATH"
# for cuda
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
# for cudnn
export LIBRARY_PATH=/usr/local/cuda/lib64
The first export was added by the anaconda installer, and the other two
were added by me after installing cuda.
Do you see any way to fix the problem?
Post by Frédéric Bastien
If after that, you still have the problem, search in your filesystem
file like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.
Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When
you install cudnn, did you move all of the files into the correct cuda
folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine
with tensorflow but when I switch to theano I get the above error message.
My theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
艾小科
2017-10-10 11:49:39 UTC
Permalink
Hello, I met the similar problem. And I have multiple installation of that
library because several people share the same deep learning server.
ImportError: cuDNN not available: Mixed dnn version. The header is from one
version, but we link with a different version (5110,6021)
圚 2017幎4月28日星期五 UTC+8䞊午6:36:24Michael Klachko写道
Post by Michael Klachko
I had the same problem, and I solved it by overwriting all versions of the
files I could find, with the latest version. Also, I used CuDNN v6 with the
latest bleeding edge Theano, and it seems to work fine.
Post by Robert
I come from a Windows environment so I'm not familiar at all with the
details of linux under the hood. So I chose Anaconda Navigator since it
makes installing packages and managing environments a lot easier.
I did a search for 'cudnn.h' and 'libcudnn.so' and I did find those
filenames in some anaconda directories.
There is one cudnn.h in home/robert/anaconda3/pkgs/cudnn-5.1-0/include,
this is not the only one.
There is one libcudnn.so in home/robert/anaconda3/pkgs/cudnn-5.1-0/lib,
this is not the only one.
These are files installed by anaconda and they are in more than one
place. After I had installed cuda I copied the cudnn files using the
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
The revision given in the cudnn.h file that I copied using the command
above is 5.1.5, but the revision that anaconda has in it's directories is
5.1.10. It seems that anaconda actually has these files as part of it's
package, and they are causing the conflict.
In case it's useful, the following text is from the bottom of my .bashrc
# added by Anaconda3 4.3.1 installer
export PATH="/home/robert/anaconda3/bin:$PATH"
# for cuda
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
# for cudnn
export LIBRARY_PATH=/usr/local/cuda/lib64
The first export was added by the anaconda installer, and the other two
were added by me after installing cuda.
Do you see any way to fix the problem?
Post by Frédéric Bastien
If after that, you still have the problem, search in your filesystem
file like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.
Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia drivers,
then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0' directories
and reinstalled cuda and nvidia. This was to make sure that the files in
these directories would only come from the latest installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When
you install cudnn, did you move all of the files into the correct cuda
folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine
with tensorflow but when I switch to theano I get the above error message.
My theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Frédéric Bastien
2017-10-11 12:32:10 UTC
Permalink
Hi,

Make sure in your environment variables there is only the directory of one
version. This should work, we work like that to allow user of the same
computer select the cudnn version they want to use.
Post by 艾小科
Hello, I met the similar problem. And I have multiple installation of
that library because several people share the same deep learning server.
ImportError: cuDNN not available: Mixed dnn version. The header is from
one version, but we link with a different version (5110,6021)
圚 2017幎4月28日星期五 UTC+8䞊午6:36:24Michael Klachko写道
Post by Michael Klachko
I had the same problem, and I solved it by overwriting all versions of
the files I could find, with the latest version. Also, I used CuDNN v6 with
the latest bleeding edge Theano, and it seems to work fine.
Post by Robert
I come from a Windows environment so I'm not familiar at all with the
details of linux under the hood. So I chose Anaconda Navigator since it
makes installing packages and managing environments a lot easier.
I did a search for 'cudnn.h' and 'libcudnn.so' and I did find those
filenames in some anaconda directories.
There is one cudnn.h in home/robert/anaconda3/pkgs/cudnn-5.1-0/include,
this is not the only one.
There is one libcudnn.so in home/robert/anaconda3/pkgs/cudnn-5.1-0/lib,
this is not the only one.
These are files installed by anaconda and they are in more than one
place. After I had installed cuda I copied the cudnn files using the
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
The revision given in the cudnn.h file that I copied using the command
above is 5.1.5, but the revision that anaconda has in it's directories is
5.1.10. It seems that anaconda actually has these files as part of it's
package, and they are causing the conflict.
In case it's useful, the following text is from the bottom of my .bashrc
# added by Anaconda3 4.3.1 installer
export PATH="/home/robert/anaconda3/bin:$PATH"
# for cuda
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
# for cudnn
export LIBRARY_PATH=/usr/local/cuda/lib64
The first export was added by the anaconda installer, and the other two
were added by me after installing cuda.
Do you see any way to fix the problem?
Post by Frédéric Bastien
If after that, you still have the problem, search in your filesystem
file like cudnn.h and libcudnn.so. There is another place where cudnn is
installed and it conflict with your new installed version.
Fred
Post by Robert Lee
$sudo cp lib64/* /usr/local/cuda/lib64/
$sudo cp include/* /usr/local/cuda/include/
When I initially had this problem I purged cuda and the nvidia
drivers, then I renamed the '/usr/local/cuda' and '/usr/local/cuda-8.0'
directories and reinstalled cuda and nvidia. This was to make sure that
the files in these directories would only come from the latest
installation.
Post by Jesse Livezey
Sounds like the cudnn header and libraries are not consistent. When
you install cudnn, did you move all of the files into the correct cuda
folders?
Post by Robert Lee
I'm trying to get theano to work with keras. My program runs fine
with tensorflow but when I switch to theano I get the above error message.
My theano version is 0.9.0. I'd appreciate any help in figuring this out.
--
---
You received this message because you are subscribed to the Google
Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...