Discussion:
[PyCUDA] Installation Error
Sean Breckling
2016-01-20 07:21:45 UTC
Permalink
OS: Ubuntu 14.04
Cuda: 7.5
Python: 2.7


When I run ./configure.py the siteconf.py file produces:

BOOST_INC_DIR = []
BOOST_LIB_DIR = []
BOOST_COMPILER = 'gcc43'
USE_SHIPPED_BOOST = True
BOOST_PYTHON_LIBNAME = ['boost_python-py27']
BOOST_THREAD_LIBNAME = ['boost_thread']
CUDA_TRACE = False
CUDA_ROOT = '/usr/local/cuda-7.5'
CUDA_ENABLE_GL = False
CUDA_ENABLE_CURAND = True
CUDADRV_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDADRV_LIBNAME = ['cuda']
CUDART_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDART_LIBNAME = ['cudart']
CURAND_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CURAND_LIBNAME = ['curand']
CXXFLAGS = []
LDFLAGS = []

When I run "make" I get the complaint:

***************************************************************
*** WARNING: nvcc not in path.
*** May need to set CUDA_INC_DIR for installation to succeed.
***************************************************************

When I run $echo CUDA_INC_DIR I see:

/usr/local/cuda-7.5/bin

When I run $locate nvcc I see (lots of stuff, but it includes):
/usr/local/cuda-7.5/bin/nvcc

----

If I run "sudo make install" the egg installs without any further
complaints (That I can see) however, when I try to run a test script I see:

ImportError: libcurand.so.7.5: cannot open shared object file: No such file
or directory

--When I run: $locate libcurand.so.7.5 I see:
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5.18

---

I do not see how to proceed with installation from here. Any help would be
greatly appreciated.
--
Sean Breckling
Graduate Assistant, Department of Mathematics
University of Nevada - Las Vegas
CDC 704
Andreas Kloeckner
2016-01-20 16:18:56 UTC
Permalink
Post by Sean Breckling
OS: Ubuntu 14.04
Cuda: 7.5
Python: 2.7
BOOST_INC_DIR = []
BOOST_LIB_DIR = []
BOOST_COMPILER = 'gcc43'
USE_SHIPPED_BOOST = True
BOOST_PYTHON_LIBNAME = ['boost_python-py27']
BOOST_THREAD_LIBNAME = ['boost_thread']
CUDA_TRACE = False
CUDA_ROOT = '/usr/local/cuda-7.5'
CUDA_ENABLE_GL = False
CUDA_ENABLE_CURAND = True
CUDADRV_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDADRV_LIBNAME = ['cuda']
CUDART_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDART_LIBNAME = ['cudart']
CURAND_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CURAND_LIBNAME = ['curand']
CXXFLAGS = []
LDFLAGS = []
***************************************************************
*** WARNING: nvcc not in path.
*** May need to set CUDA_INC_DIR for installation to succeed.
***************************************************************
/usr/local/cuda-7.5/bin
/usr/local/cuda-7.5/bin/nvcc
----
If I run "sudo make install" the egg installs without any further
ImportError: libcurand.so.7.5: cannot open shared object file: No such file
or directory
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5.18
Add

/usr/local/cuda-7.5/targets/x86_64-linux/lib/l

to your LD_LIBRARY_PATH, and add

/usr/local/cuda-7.5/bin

to your path.

HTH,
Andreas
Sean Breckling
2016-01-20 17:48:55 UTC
Permalink
Andreas,

I've added those paths, and also added:

/usr/local/cuda-7.5/targets/x86_64-linux/lib

to LD_LIBRARY_PATH (in case that extra /l was a typo).

The outcome hasn't changed.

ImportError: libcurand.so.7.5: cannot open shared object file: No such file
or directory

Thanks!
Post by Sean Breckling
Post by Sean Breckling
OS: Ubuntu 14.04
Cuda: 7.5
Python: 2.7
BOOST_INC_DIR = []
BOOST_LIB_DIR = []
BOOST_COMPILER = 'gcc43'
USE_SHIPPED_BOOST = True
BOOST_PYTHON_LIBNAME = ['boost_python-py27']
BOOST_THREAD_LIBNAME = ['boost_thread']
CUDA_TRACE = False
CUDA_ROOT = '/usr/local/cuda-7.5'
CUDA_ENABLE_GL = False
CUDA_ENABLE_CURAND = True
CUDADRV_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDADRV_LIBNAME = ['cuda']
CUDART_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CUDART_LIBNAME = ['cudart']
CURAND_LIB_DIR = ['${CUDA_ROOT}/lib', '${CUDA_ROOT}/lib64',
'${CUDA_ROOT}/lib/stubs', '${CUDA_ROOT}/lib64/stubs']
CURAND_LIBNAME = ['curand']
CXXFLAGS = []
LDFLAGS = []
***************************************************************
*** WARNING: nvcc not in path.
*** May need to set CUDA_INC_DIR for installation to succeed.
***************************************************************
/usr/local/cuda-7.5/bin
/usr/local/cuda-7.5/bin/nvcc
----
If I run "sudo make install" the egg installs without any further
complaints (That I can see) however, when I try to run a test script I
ImportError: libcurand.so.7.5: cannot open shared object file: No such
file
Post by Sean Breckling
or directory
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcurand.so.7.5.18
Add
/usr/local/cuda-7.5/targets/x86_64-linux/lib/l
to your LD_LIBRARY_PATH, and add
/usr/local/cuda-7.5/bin
to your path.
HTH,
Andreas
--
Sean Breckling
Graduate Assistant, Department of Mathematics
University of Nevada - Las Vegas
CDC 704
Andreas Kloeckner
2016-01-20 18:03:05 UTC
Permalink
Post by Sean Breckling
Andreas,
/usr/local/cuda-7.5/targets/x86_64-linux/lib
to LD_LIBRARY_PATH (in case that extra /l was a typo).
The outcome hasn't changed.
ImportError: libcurand.so.7.5: cannot open shared object file: No such file
or directory
Smells like an architecture mismatch--did you install a 32-bit toolkit
but are building on a 64-bit system?

Andreas
Sean Breckling
2016-01-20 18:48:01 UTC
Permalink
Cuda is definitely 64bit.


Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2

The command: $python -c 'import sys;print("%x" % sys.maxsize, sys.maxsize >
2**32)'
returns:
('7fffffffffffffff', True)

I'm not sure what else I could have running 32bit that would get in the way?
Post by Andreas Kloeckner
Post by Sean Breckling
Andreas,
/usr/local/cuda-7.5/targets/x86_64-linux/lib
to LD_LIBRARY_PATH (in case that extra /l was a typo).
The outcome hasn't changed.
ImportError: libcurand.so.7.5: cannot open shared object file: No such
file
Post by Sean Breckling
or directory
Smells like an architecture mismatch--did you install a 32-bit toolkit
but are building on a 64-bit system?
Andreas
--
Sean Breckling
Graduate Assistant, Department of Mathematics
University of Nevada - Las Vegas
CDC 704
Andreas Kloeckner
2016-01-20 20:31:11 UTC
Permalink
Post by Sean Breckling
Cuda is definitely 64bit.
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
The command: $python -c 'import sys;print("%x" % sys.maxsize, sys.maxsize >
2**32)'
('7fffffffffffffff', True)
I'm not sure what else I could have running 32bit that would get in the way?
Try running 'ldd' on PyCUDA's _driver.so and see what that says.

Andreas
Sean Breckling
2016-01-20 22:08:31 UTC
Permalink
Here's the results. I'm not sure what to make of it, personally.

***@sean-Hi-Fi-A85W:~/Downloads/pycuda/build/lib.linux-x86_64-2.7/pycuda$
ldd _driver.so
linux-vdso.so.1 => (0x00007ffcfdb68000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f6e820c8000)
libcurand.so.7.5 => /usr/local/cuda-7.5/lib64/libcurand.so.7.5
(0x00007f6e7e860000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f6e7e558000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6e7e340000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f6e7e120000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6e7dd58000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6e7db50000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6e7d948000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6e7d640000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6e83438000)

Thannks again!
Post by Sean Breckling
Post by Sean Breckling
Cuda is definitely 64bit.
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
The command: $python -c 'import sys;print("%x" % sys.maxsize,
sys.maxsize >
Post by Sean Breckling
2**32)'
('7fffffffffffffff', True)
I'm not sure what else I could have running 32bit that would get in the
way?
Try running 'ldd' on PyCUDA's _driver.so and see what that says.
Andreas
--
Sean Breckling
Graduate Assistant, Department of Mathematics
University of Nevada - Las Vegas
CDC 704
Andreas Kloeckner
2016-01-20 23:55:08 UTC
Permalink
Post by Sean Breckling
Here's the results. I'm not sure what to make of it, personally.
ldd _driver.so
linux-vdso.so.1 => (0x00007ffcfdb68000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f6e820c8000)
libcurand.so.7.5 => /usr/local/cuda-7.5/lib64/libcurand.so.7.5
(0x00007f6e7e860000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f6e7e558000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6e7e340000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f6e7e120000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6e7dd58000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6e7db50000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6e7d948000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6e7d640000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6e83438000)
According to this, your system is seeing all the libraries it needs to
run pycuda (otherwise there would be entries of "not found"). In
particular, it's claiming to find the libraries it didn't claim to find
when you tried to import the library. I'm a bit confused, if I'm honest.

Andreas
Chris O'Halloran
2016-01-21 00:01:34 UTC
Permalink
Sean,

Have you seen the comments here - I found them useful in the past.

http://wiki.tiker.net/PyCuda/Installation/Linux/Ubuntu
Post by Sean Breckling
Post by Sean Breckling
Here's the results. I'm not sure what to make of it, personally.
:~/Downloads/pycuda/build/lib.linux-x86_64-2.7/pycuda$
Post by Sean Breckling
ldd _driver.so
linux-vdso.so.1 => (0x00007ffcfdb68000)
libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1
(0x00007f6e820c8000)
Post by Sean Breckling
libcurand.so.7.5 => /usr/local/cuda-7.5/lib64/libcurand.so.7.5
(0x00007f6e7e860000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x00007f6e7e558000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6e7e340000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f6e7e120000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6e7dd58000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6e7db50000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f6e7d948000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6e7d640000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6e83438000)
According to this, your system is seeing all the libraries it needs to
run pycuda (otherwise there would be entries of "not found"). In
particular, it's claiming to find the libraries it didn't claim to find
when you tried to import the library. I'm a bit confused, if I'm honest.
Andreas
_______________________________________________
PyCUDA mailing list
http://lists.tiker.net/listinfo/pycuda
Loading...