Hi all,
I have a fresh installed ubuntu 14.04.3 distribution, with cuda 7.0 and pycuda 2015.1.3. I'm using an NVIDIA GTX 960 card and the latest driver 361.28. All the installation went well but when i run test_driver.py i get :
============================= test session starts ==============================
platform linux2 -- Python 2.7.6, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /opt/pycuda-2015.1.3, inifile:
collected 23 items
test_driver.py ................x......
===================== 22 passed, 1 xfailed in 5.91 seconds =====================
Can you please help me to understand why the test fails once?
Thank you very much,
Dorin
Received from Walter White on Thu, Feb 25, 2016 at 08:48:59AM EST:
> Hello,
>
> are there functions for linear interpolation and trapezoidal rule
> integration in CUDA?
> Something like interp1d or trapz in in Python and Matlab.
> Or how would you do it? So far I am iterating trough a list manually.
>
> Kind regards,
> Joe
There are 1D and 2D trapezoidal integration methods available in scikit-cuda,
although their performance probably could be improved:
http://scikit-cuda.readthedocs.org/en/latest/reference_integrate.html
--
Lev Givon
Bionet Group | Neurokernel Project
http://lebedov.github.io/http://neurokernel.github.io/
Hello,
are there functions for linear interpolation and trapezoidal rule
integration in CUDA?
Something like interp1d or trapz in in Python and Matlab.
Or how would you do it? So far I am iterating trough a list manually.
Kind regards,
Joe
Yuan Chen <chenyuan920911(a)gmail.com> writes:
> Hi,
>
> I just start to use pycuda to do some gpu computing.
>
> However, I found that transfering numpy arrays to gpu costs a lot of time
> and so does compiling the source.
>
> I am using the SourceModule now and as far as I know, for example, I have a
> file called try.py and a kernel function called searching(float *arr), the
> question is
>
> 1) Everytime I run the try.py, the searching function is compiled once,
> and cached later until the codes end. So I am wondering if I can
> perminantly save that function and load the saved function so that I don't
> have to compile it when I run the script.
PyCUDA caches the binaries for your source code as much as possible. So
once you compile the same code a second time, SourceModule construction
should be quite fast. Are you finding otherwise?
> 2) Is there a way that make transfering data faster? I read the documents,
> is the managed memory gonna help with this?
Read about page-locked host memory. Those transfers are a fair bit
faster than non-page-locked ones, since the hardware can do them on its
own.
Andreas
Hi,
I just start to use pycuda to do some gpu computing.
However, I found that transfering numpy arrays to gpu costs a lot of time
and so does compiling the source.
I am using the SourceModule now and as far as I know, for example, I have a
file called try.py and a kernel function called searching(float *arr), the
question is
1) Everytime I run the try.py, the searching function is compiled once,
and cached later until the codes end. So I am wondering if I can
perminantly save that function and load the saved function so that I don't
have to compile it when I run the script.
2) Is there a way that make transfering data faster? I read the documents,
is the managed memory gonna help with this?
Thanks a lot for help.
Best Regards,
Yuan Chen
Hi,
1. I'm having trouble installing pycuda on a Win 10 notebook.2. I installed Cuda 5.53. I downloaded pycuda pycuda-2015.1.3 from git4. I downloaded boost_1_59_0.5. I ran configure.py.
6. My siteconf.py file looks like this:BOOST_INC_DIR = ['C:\\local\\boost_1_59_0\\boost']
BOOST_LIB_DIR = ['C:\\local\\boost_1_59_0\\lib64-msvc-12.0']
BOOST_COMPILER = 'gcc43'
USE_SHIPPED_BOOST = True
BOOST_PYTHON_LIBNAME = ['boost_python-vc120-mt-gd-1_59']
BOOST_THREAD_LIBNAME = ['boost_thread-vc120-mt-gd-1_59']
CUDA_TRACE = False
CUDA_ROOT = 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v5.5'
CUDA_ENABLE_GL = False
CUDA_ENABLE_CURAND = True
CUDADRV_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CUDADRV_LIBNAME = ['cuda']
CUDART_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CUDART_LIBNAME = ['cudart']
CURAND_LIB_DIR = ['${CUDA_ROOT}\\lib\\x64']
CURAND_LIBNAME = ['curand'].
7. My errors when I run "python setup.py install" are as follows:C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-atonexit.o):atonexit.c:(.text+0xb0):multiple definition of `atexit'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs01081.o):(.text+0x0):first defined hereC:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o):mingw_helpers.c:(.text+0x0):multiple definition of `_decode_pointer'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00231.o):(.text+0x0):first defined hereC:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o):mingw_helpers.c:(.text+0x10):multiple definition of `_encode_pointer'C:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00241.o):(.text+0x0):first defined hereC:\SciSoft\WinPython-64bit-2.7.9.4\scripts\..\python-2.7.9.amd64\libs/libmsvcr90.a(dodnibs00288.o):(.text+0x0):multiple definition of `_fpreset'C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-CRT_fp8.o):CRT_fp8.c:(.text+0x0):first defined herebuild\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x1f4):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x217):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2b6):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2f2):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x3ba):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x41b):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x4d5):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x5b3):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x856):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0xb0d):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0xccb):undefined reference to `InterlockedIncrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x2f28):undefined reference to `InterlockedDecrement'build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:thread.cpp:(.text+0x3acf):undefined reference to `InterlockedDecrement'C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:build\temp.win-amd64-2.7\Release\bpl-subset\bpl_subset\libs\thread\src\win32\thread.o:bad reloc address 0x8 in section `.data'collect2.exe: error: ld returned 1 exit statuserror: command'C:\\SciSoft\\WinPython-64bit-2.7.9.4\\scripts\\..\\python-2.7.9.amd64\\..\\tools\\mingw32\\bin\\g++.exe'failed with exit status 1.8. I look on the archive and found patches to mitigate the InterlockedDecrement and InterlockedIncrement errors, but they appeared to be already in place. (unless I was looking at the wrong files in \boost).
.
9. Any comments that you can provide would be helpful..
10. FYI, running "pip install pycuda" also fails (I think due to the following automated lib and lib64 path assignment error, i.e., mixed forward/backward slash and lib64 should be .\v5.5\lib\x64..
.... -LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib64""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib""-LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5/lib64"-Lc:\scisoft\winpython-64bit-2.7.9.4\python-2.7.9.amd64\libs-Lc:\scisoft\winpython-64bit-2.7.9.4\python-2.7.9.amd64\PCbuild\amd64 -lcuda-lcurand -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\pycuda\_driver.pyd C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -lcuda C:/SciSoft/WinPython-64bit-2.7.9.4/tools/mingw32/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:cannot find -lcurand.
Best Regards,Arnold TunickUS Army Research Laboratory
Hi,
I've read on https://wiki.tiker.net/PyCuda/Installation/Linux
that "Boost C++ libraries are no longer a dependency of PyCUDA."
Also on Mac installation wiki it's written that you do not need boost for
pycuda.
Yet I'm unable to install pycuda WITHOUT boost on my system, is it
possible? How?
Or is it a bad wording, and boost on linux is needed to properly compile
and install pycuda.
I'm on ubuntu 15.10 with fresh MANUAL installation of cuda-7.5 which
works ok.
Here is error message during pycuda attempt:
radek@black:~/pycuda-2015.1.3$ python setup.py build
running build
running build_py
running build_ext
building '_driver' extension
x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -O3 -DNDEBUG
-fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong
-Wformat -Werror=format-security -fPIC -DPYGPU_PYCUDA=1
-DPYGPU_PACKAGE=pycuda -DHAVE_CURAND=1 -Isrc/cpp
-I/usr/local/cuda-7.5/include
-I/usr/lib/python2.7/dist-packages/numpy/core/include
-I/usr/include/python2.7 -c src/cpp/cuda.cpp -o
build/temp.linux-x86_64-2.7/src/cpp/cuda.o
In file included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:30:32: fatal error: boost/shared_ptr.hpp: No such file
or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
--
r