ValueError: numpy.dtype has the wrong size, try recompiling #20

Closed
josephmisiti opened this Issue Sep 25, 2015 · 9 comments

Comments

Projects
None yet
2 participants
@josephmisiti

On a GPU instance on Amazon:

(venv)ubuntu@ip-172-31-30-194:~/neural_artistic_style$ python neural_artistic_style.py --subject images/tuebingen.jpg --style images/starry_night.jpg
CUDArray: CUDA back-end not available, using NumPy.
Traceback (most recent call last):
  File "neural_artistic_style.py", line 7, in <module>
    import deeppy as dp
  File "build/bdist.linux-x86_64/egg/deeppy/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/deeppy/dataset/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/deeppy/dataset/infimnist.py", line 6, in <module>
  File "build/bdist.linux-x86_64/egg/deeppy/base.py", line 1, in <module>
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/cudarray-0.1.dev0-py2.7-linux-x86_64.egg/cudarray/__init__.py", line 39, in <module>
    from .numpy_backend import *
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/cudarray-0.1.dev0-py2.7-linux-x86_64.egg/cudarray/numpy_backend/__init__.py", line 2, in <module>
    from .nnet import *
  File "/home/ubuntu/venv/local/lib/python2.7/site-packages/cudarray-0.1.dev0-py2.7-linux-x86_64.egg/cudarray/numpy_backend/nnet/__init__.py", line 3, in <module>
    from .conv_bc01 import *
  File "__init__.pxd", line 155, in init cudarray.numpy_backend.nnet.conv_bc01 (cudarray/numpy_backend/nnet/conv_bc01.c:5161)
ValueError: numpy.dtype has the wrong size, try recompiling

Here are my packages:

(venv)ubuntu@ip-172-31-30-194:~/neural_artistic_style$ pip freeze
alabaster==0.7.6
anyjson==0.3.3
appnope==0.1.0
Babel==2.0
backports.ssl-match-hostname==3.4.0.2
certifi==2015.9.6.2
circus==0.12.1
circus-web==1.0.0
cudarray==0.1.dev0
Cython==0.23.2
decorator==4.0.3
deeppy==0.1.dev0
docutils==0.12
funcsigs==0.4
functools32==3.2.3.post2
gnureadline==6.3.3
iowait==0.2
ipykernel==4.0.3
ipyparallel==4.0.2
ipython==4.0.0
ipython-genutils==0.1.0
Jinja2==2.8
jsonschema==2.5.1
jupyter-client==4.0.0
jupyter-core==4.0.6
Mako==1.0.2
MarkupSafe==0.23
matplotlib==1.4.3
mistune==0.7.1
mock==1.3.0
nbconvert==4.0.0
nbformat==4.0.0
networkx==1.10
nose==1.3.7
notebook==4.0.5
numpy==1.9.3
numpydoc==0.5
pandas==0.16.2
path.py==8.1.1
pbr==1.8.0
pexpect==3.3
pickleshare==0.5
Pillow==2.9.0
psutil==3.2.1
ptyprocess==0.5
Pygments==2.0.2
pyparsing==2.0.3
pyreadline==2.1
python-dateutil==2.4.2
pytz==2015.6
pyzmq==14.7.0
qtconsole==4.0.1
requests==2.7.0
scikit-image==0.11.3
-e git://github.com/scikit-learn/scikit-learn.git@8fcd0632fa807f5f1e34e2af1a626519717c6ba1#egg=scikit_learn-master
scipy==0.16.0
simplegeneric==0.8.1
simplejson==3.8.0
six==1.9.0
snowballstemmer==1.2.0
Sphinx==1.3.1
sphinx-rtd-theme==0.1.9
terminado==0.5
testpath==0.2
-e git://github.com/Theano/Theano.git@5bab81bbe8fea6134bbd24502af2b32b6986098e#egg=Theano-master
tomako==0.1.0
TornadIO2==0.0.3
tornado==4.2.1
traitlets==4.0.0
wheel==0.24.0

I installed cudarray and deeppy from source using

python setup.py install

@josephmisiti josephmisiti changed the title from Error trying to run example to ValueError: numpy.dtype has the wrong size, try recompiling Sep 25, 2015

@andersbll

This comment has been minimized.

Show comment
Hide comment
@andersbll

andersbll Sep 25, 2015

Owner

Hey, have you installed CUDArray with the CUDA backend? Also, make sure to set the environment variable LD_LIBRARY_PATH to point to the location where libcudarray is installed. More info here

Owner

andersbll commented Sep 25, 2015

Hey, have you installed CUDArray with the CUDA backend? Also, make sure to set the environment variable LD_LIBRARY_PATH to point to the location where libcudarray is installed. More info here

@josephmisiti

This comment has been minimized.

Show comment
Hide comment
@josephmisiti

josephmisiti Sep 25, 2015

When I ran make and make install it did not produce any errors, nor did python setup.py install - that means yes right ? I did not pass the python setup.py --without-cuda install flags ....

When I ran make and make install it did not produce any errors, nor did python setup.py install - that means yes right ? I did not pass the python setup.py --without-cuda install flags ....

@josephmisiti

This comment has been minimized.

Show comment
Hide comment
@josephmisiti

josephmisiti Sep 25, 2015

Here is an example:

ubuntu@ip-172-31-16-25:~/cudarray$ make
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/conv_bc01_matmul.o src/nnet/conv_bc01_matmul.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/pool_b01.o src/nnet/pool_b01.cu
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/cudnn.o src/nnet/cudnn.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/array_ops.o src/array_ops.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/elementwise.o src/elementwise.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/reduction.o src/reduction.cu
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/blas.o src/blas.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/random.o src/random.cu
    nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/image/img2win.o src/image/img2win.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/one_hot.o src/nnet/one_hot.cu
mkdir -p ./build
g++ -shared -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -o build/libcudarray.so src/nnet/conv_bc01_matmul.o src/nnet/pool_b01.o src/nnet/cudnn.o src/array_ops.o src/elementwise.o src/reduction.o src/blas.o src/random.o src/image/img2win.o src/nnet/one_hot.o -L/usr/local/cuda-7.5//lib64 -L/usr/local/cuda-7.5//lib -lcudart -lcublas -lcufft -lcurand -lcudnn
ubuntu@ip-172-31-16-25:~/cudarray$ make install
cp ./build/libcudarray.so /usr/local//lib/libcudarray.so
cp: cannot create regular file ‘/usr/local//lib/libcudarray.so’: Permission denied
make: *** [/usr/local//lib/libcudarray.so] Error 1
ubuntu@ip-172-31-16-25:~/cudarray$ sudo make install
cp ./build/libcudarray.so /usr/local/lib/libcudarray.so

And

ubuntu@ip-172-31-16-25:~/cudarray$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to cudarray.egg-info/requires.txt
writing cudarray.egg-info/PKG-INFO
writing top-level names to cudarray.egg-info/top_level.txt
writing dependency_links to cudarray.egg-info/dependency_links.txt
reading manifest file 'cudarray.egg-info/SOURCES.txt'
writing manifest file 'cudarray.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
skipping './cudarray/wrap/cudart.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/array_data.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/array_ops.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/elementwise.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/reduction.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/blas.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/random.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/nnet.cpp' Cython extension (up-to-date)
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/batch/linalg.py -> build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/batch/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/reduction.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/cudarray.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/linalg.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/__init__.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/random.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/helpers.py -> build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/conv.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/pool.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/math.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/special.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
creating build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/array_ops.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/array_data.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/reduction.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/nnet.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/blas.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/random.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/cudart.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/elementwise.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/base.py -> build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/numpy_backend
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend
creating build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/conv.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/pool.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/lrnorm_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/pool_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/activations.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/conv_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/special.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/elementwise.py -> build/bdist.linux-x86_64/egg/cudarray
byte-compiling build/bdist.linux-x86_64/egg/cudarray/batch/linalg.py to linalg.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/batch/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/reduction.py to reduction.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/cudarray.py to cudarray.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/linalg.py to linalg.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/random.py to random.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/helpers.py to helpers.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/conv.py to conv.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/pool.py to pool.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/math.py to math.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/special.py to special.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/base.py to base.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/conv.py to conv.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/pool.py to pool.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/activations.py to activations.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/special.py to special.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/elementwise.py to elementwise.pyc
creating stub loader for cudarray/numpy_backend/nnet/conv_bc01.so
creating stub loader for cudarray/numpy_backend/nnet/pool_bc01.so
creating stub loader for cudarray/numpy_backend/nnet/lrnorm_bc01.so
creating stub loader for cudarray/wrap/cudart.so
creating stub loader for cudarray/wrap/array_data.so
creating stub loader for cudarray/wrap/array_ops.so
creating stub loader for cudarray/wrap/elementwise.so
creating stub loader for cudarray/wrap/reduction.so
creating stub loader for cudarray/wrap/blas.so
creating stub loader for cudarray/wrap/random.so
creating stub loader for cudarray/wrap/nnet.so
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/conv_bc01.py to conv_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/pool_bc01.py to pool_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/lrnorm_bc01.py to lrnorm_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/cudart.py to cudart.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/array_data.py to array_data.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/array_ops.py to array_ops.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/elementwise.py to elementwise.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/reduction.py to reduction.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/blas.py to blas.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/random.py to random.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/nnet.py to nnet.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/cudarray-0.1.dev-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing cudarray-0.1.dev-py2.7-linux-x86_64.egg
removing '/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg
Extracting cudarray-0.1.dev-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
cudarray 0.1.dev is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg
Processing dependencies for cudarray==0.1.dev
Searching for numpy==1.8.2
Best match: numpy 1.8.2
numpy 1.8.2 is already the active version in easy-install.pth

Using /usr/lib/python2.7/dist-packages
Searching for Cython==0.23.2
Best match: Cython 0.23.2
Adding Cython 0.23.2 to easy-install.pth file
Installing cython script to /usr/local/bin
Installing cygdb script to /usr/local/bin
Installing cythonize script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages
Finished processing dependencies for cudarray==0.1.dev

Now I see the following:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ python neural_artistic_style.py --help
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/ubuntu/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
CUDArray: CUDA back-end not available, using NumPy.

Specifically CUDArray: CUDA back-end not available, using NumPy.

And when I try to run your example:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ python neural_artistic_style.py --subject images/tuebingen.jpg --style images/starry_night.jpg
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/ubuntu/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
CUDArray: CUDA back-end not available, using NumPy.

So I admit, this is now a different error, but something is configured wrong nonetheless. Also, I set the flag

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $CUDNN_ENABLED
1

in bashrc

Here is an example:

ubuntu@ip-172-31-16-25:~/cudarray$ make
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/conv_bc01_matmul.o src/nnet/conv_bc01_matmul.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/pool_b01.o src/nnet/pool_b01.cu
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/cudnn.o src/nnet/cudnn.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/array_ops.o src/array_ops.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/elementwise.o src/elementwise.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/reduction.o src/reduction.cu
g++ -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -I./include -I/usr/local/cuda-7.5//include -c -o src/blas.o src/blas.cpp
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/random.o src/random.cu
    nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/image/img2win.o src/image/img2win.cu
nvcc -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=compute_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_30,code=compute_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_35,code=compute_35 -O3 --compiler-options '-DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors' --ftz=true --prec-div=false -prec-sqrt=false --fmad=true -I./include -I/usr/local/cuda-7.5//include -c -o src/nnet/one_hot.o src/nnet/one_hot.cu
mkdir -p ./build
g++ -shared -DCUDNN_ENABLED -O3 -fPIC -Wall -Wfatal-errors -o build/libcudarray.so src/nnet/conv_bc01_matmul.o src/nnet/pool_b01.o src/nnet/cudnn.o src/array_ops.o src/elementwise.o src/reduction.o src/blas.o src/random.o src/image/img2win.o src/nnet/one_hot.o -L/usr/local/cuda-7.5//lib64 -L/usr/local/cuda-7.5//lib -lcudart -lcublas -lcufft -lcurand -lcudnn
ubuntu@ip-172-31-16-25:~/cudarray$ make install
cp ./build/libcudarray.so /usr/local//lib/libcudarray.so
cp: cannot create regular file ‘/usr/local//lib/libcudarray.so’: Permission denied
make: *** [/usr/local//lib/libcudarray.so] Error 1
ubuntu@ip-172-31-16-25:~/cudarray$ sudo make install
cp ./build/libcudarray.so /usr/local/lib/libcudarray.so

And

ubuntu@ip-172-31-16-25:~/cudarray$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to cudarray.egg-info/requires.txt
writing cudarray.egg-info/PKG-INFO
writing top-level names to cudarray.egg-info/top_level.txt
writing dependency_links to cudarray.egg-info/dependency_links.txt
reading manifest file 'cudarray.egg-info/SOURCES.txt'
writing manifest file 'cudarray.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
skipping './cudarray/wrap/cudart.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/array_data.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/array_ops.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/elementwise.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/reduction.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/blas.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/random.cpp' Cython extension (up-to-date)
skipping './cudarray/wrap/nnet.cpp' Cython extension (up-to-date)
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/batch/linalg.py -> build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/batch/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/batch
copying build/lib.linux-x86_64-2.7/cudarray/reduction.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/cudarray.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/linalg.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/__init__.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/random.py -> build/bdist.linux-x86_64/egg/cudarray
copying build/lib.linux-x86_64-2.7/cudarray/helpers.py -> build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/conv.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/pool.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/math.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
copying build/lib.linux-x86_64-2.7/cudarray/nnet/special.py -> build/bdist.linux-x86_64/egg/cudarray/nnet
creating build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/array_ops.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/array_data.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/reduction.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/nnet.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/blas.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/random.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/cudart.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/wrap/elementwise.so -> build/bdist.linux-x86_64/egg/cudarray/wrap
copying build/lib.linux-x86_64-2.7/cudarray/base.py -> build/bdist.linux-x86_64/egg/cudarray
creating build/bdist.linux-x86_64/egg/cudarray/numpy_backend
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend
creating build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/conv.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/pool.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/lrnorm_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/pool_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/activations.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/__init__.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/conv_bc01.so -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/numpy_backend/nnet/special.py -> build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet
copying build/lib.linux-x86_64-2.7/cudarray/elementwise.py -> build/bdist.linux-x86_64/egg/cudarray
byte-compiling build/bdist.linux-x86_64/egg/cudarray/batch/linalg.py to linalg.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/batch/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/reduction.py to reduction.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/cudarray.py to cudarray.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/linalg.py to linalg.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/random.py to random.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/helpers.py to helpers.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/conv.py to conv.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/pool.py to pool.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/math.py to math.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/nnet/special.py to special.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/base.py to base.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/conv.py to conv.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/pool.py to pool.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/activations.py to activations.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/special.py to special.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/elementwise.py to elementwise.pyc
creating stub loader for cudarray/numpy_backend/nnet/conv_bc01.so
creating stub loader for cudarray/numpy_backend/nnet/pool_bc01.so
creating stub loader for cudarray/numpy_backend/nnet/lrnorm_bc01.so
creating stub loader for cudarray/wrap/cudart.so
creating stub loader for cudarray/wrap/array_data.so
creating stub loader for cudarray/wrap/array_ops.so
creating stub loader for cudarray/wrap/elementwise.so
creating stub loader for cudarray/wrap/reduction.so
creating stub loader for cudarray/wrap/blas.so
creating stub loader for cudarray/wrap/random.so
creating stub loader for cudarray/wrap/nnet.so
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/conv_bc01.py to conv_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/pool_bc01.py to pool_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/numpy_backend/nnet/lrnorm_bc01.py to lrnorm_bc01.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/cudart.py to cudart.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/array_data.py to array_data.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/array_ops.py to array_ops.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/elementwise.py to elementwise.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/reduction.py to reduction.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/blas.py to blas.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/random.py to random.pyc
byte-compiling build/bdist.linux-x86_64/egg/cudarray/wrap/nnet.py to nnet.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying cudarray.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/cudarray-0.1.dev-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing cudarray-0.1.dev-py2.7-linux-x86_64.egg
removing '/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg
Extracting cudarray-0.1.dev-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
cudarray 0.1.dev is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg
Processing dependencies for cudarray==0.1.dev
Searching for numpy==1.8.2
Best match: numpy 1.8.2
numpy 1.8.2 is already the active version in easy-install.pth

Using /usr/lib/python2.7/dist-packages
Searching for Cython==0.23.2
Best match: Cython 0.23.2
Adding Cython 0.23.2 to easy-install.pth file
Installing cython script to /usr/local/bin
Installing cygdb script to /usr/local/bin
Installing cythonize script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages
Finished processing dependencies for cudarray==0.1.dev

Now I see the following:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ python neural_artistic_style.py --help
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/ubuntu/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
CUDArray: CUDA back-end not available, using NumPy.

Specifically CUDArray: CUDA back-end not available, using NumPy.

And when I try to run your example:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ python neural_artistic_style.py --subject images/tuebingen.jpg --style images/starry_night.jpg
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/ubuntu/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
CUDArray: CUDA back-end not available, using NumPy.

So I admit, this is now a different error, but something is configured wrong nonetheless. Also, I set the flag

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $CUDNN_ENABLED
1

in bashrc

@andersbll

This comment has been minimized.

Show comment
Hide comment
@andersbll

andersbll Sep 25, 2015

Owner

Hey, you need to run sudo make install to avoid the error

cp: cannot create regular file ‘/usr/local//lib/libcudarray.so’: Permission denied
Owner

andersbll commented Sep 25, 2015

Hey, you need to run sudo make install to avoid the error

cp: cannot create regular file ‘/usr/local//lib/libcudarray.so’: Permission denied
@josephmisiti

This comment has been minimized.

Show comment
Hide comment
@josephmisiti

josephmisiti Sep 25, 2015

Hey - i fixed that one already ... thanks!

Hey - i fixed that one already ... thanks!

@josephmisiti

This comment has been minimized.

Show comment
Hide comment
@josephmisiti

josephmisiti Sep 25, 2015

A couple more outputs that may be useful:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $INSTALL_PREFIX
/usr/local/
ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $CUDA_PREFIX
/usr/local/cuda-7.5/

A couple more outputs that may be useful:

ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $INSTALL_PREFIX
/usr/local/
ubuntu@ip-172-31-16-25:~/neural_artistic_style$ echo $CUDA_PREFIX
/usr/local/cuda-7.5/
@andersbll

This comment has been minimized.

Show comment
Hide comment
@andersbll

andersbll Sep 25, 2015

Owner

Ok, then try forcing CUDArray to use the CUDA backend:

import os
os.environ['CUDARRAY_BACKEND'] = 'cuda'
import cudarray

This should give you an error message.

Owner

andersbll commented Sep 25, 2015

Ok, then try forcing CUDArray to use the CUDA backend:

import os
os.environ['CUDARRAY_BACKEND'] = 'cuda'
import cudarray

This should give you an error message.

@josephmisiti

This comment has been minimized.

Show comment
Hide comment
@josephmisiti

josephmisiti Sep 25, 2015

Yep! That fixed it!

ubuntu@ip-172-31-16-25:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['CUDARRAY_BACKEND'] = 'cuda'
>>> import cudarray
CUDArray: Failed to load CUDA back-end.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg/cudarray/__init__.py", line 20, in <module>
    from .cudarray import *
  File "/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg/cudarray/cudarray.py", line 2, in <module>
    from .wrap.array_data import ArrayData
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory
>>> exit()
ubuntu@ip-172-31-16-25:~$ sudo find / -name 'libcudart.so.7.5'
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcudart.so.7.5
ubuntu@ip-172-31-16-25:~$ export LD_LIBRARY_PATH=/home/ubuntu/cudarray/build/;/usr/local/cuda-7.5/targets/x86_64-linux/lib/
-bash: /usr/local/cuda-7.5/targets/x86_64-linux/lib/: Is a directory
ubuntu@ip-172-31-16-25:~$ export LD_LIBRARY_PATH='/home/ubuntu/cudarray/build/;/usr/local/cuda-7.5/targets/x86_64-linux/lib/'
ubuntu@ip-172-31-16-25:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['CUDARRAY_BACKEND'] = 'cuda'
>>> import cudarray
>>>

Thanks for your help!

Yep! That fixed it!

ubuntu@ip-172-31-16-25:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['CUDARRAY_BACKEND'] = 'cuda'
>>> import cudarray
CUDArray: Failed to load CUDA back-end.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg/cudarray/__init__.py", line 20, in <module>
    from .cudarray import *
  File "/usr/local/lib/python2.7/dist-packages/cudarray-0.1.dev-py2.7-linux-x86_64.egg/cudarray/cudarray.py", line 2, in <module>
    from .wrap.array_data import ArrayData
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory
>>> exit()
ubuntu@ip-172-31-16-25:~$ sudo find / -name 'libcudart.so.7.5'
/usr/local/cuda-7.5/targets/x86_64-linux/lib/libcudart.so.7.5
ubuntu@ip-172-31-16-25:~$ export LD_LIBRARY_PATH=/home/ubuntu/cudarray/build/;/usr/local/cuda-7.5/targets/x86_64-linux/lib/
-bash: /usr/local/cuda-7.5/targets/x86_64-linux/lib/: Is a directory
ubuntu@ip-172-31-16-25:~$ export LD_LIBRARY_PATH='/home/ubuntu/cudarray/build/;/usr/local/cuda-7.5/targets/x86_64-linux/lib/'
ubuntu@ip-172-31-16-25:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ['CUDARRAY_BACKEND'] = 'cuda'
>>> import cudarray
>>>

Thanks for your help!

@andersbll

This comment has been minimized.

Show comment
Hide comment
@andersbll

andersbll Sep 25, 2015

Owner

Good to hear! :)

Owner

andersbll commented Sep 25, 2015

Good to hear! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment