Mac/9400M error: pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
by Ian Ozsvald
When running dump_properties.py on my MacBook with a 9400M I get the
following error:
pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
dump_properties.py works fine on my WinXP machine with a 9800GT.
Here's the error:
python dump_properties.py
1 device(s) found.
Device #0: GeForce 9400M
Compute Capability: 1.1
Total Memory: 259776 KB
Traceback (most recent call last):
File "dump_properties.py", line 14, in <module>
for att, value in dev.get_attributes().iteritems()]
File
"/Library/Python/2.5/site-packages/pycuda-0.94beta-py2.5-macosx-10.5-i386.egg/pycuda/driver.py",
line 51, in device_get_attributes
for att in dir(device_attribute)
File
"/Library/Python/2.5/site-packages/pycuda-0.94beta-py2.5-macosx-10.5-i386.egg/pycuda/driver.py",
line 52, in <genexpr>
if att[0].isupper())
pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
And if I step through the code in an interactive python shell...
ian-ozsvalds-macbook:examples ian$ python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycuda.driver as drv
>>> drv.init()
>>> print "%d device(s) found." % drv.Device.count()
1 device(s) found.
>>> dev=drv.Device(0)
>>> print "Device #%d: %s" % (0, dev.name())
Device #0: GeForce 9400M
>>> dev.get_attributes()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Python/2.5/site-packages/pycuda-0.94beta-py2.5-macosx-10.5-i386.egg/pycuda/driver.py",
line 51, in device_get_attributes
for att in dir(device_attribute)
File
"/Library/Python/2.5/site-packages/pycuda-0.94beta-py2.5-macosx-10.5-i386.egg/pycuda/driver.py",
line 52, in <genexpr>
if att[0].isupper())
pycuda._driver.LogicError: cuDeviceGetAttribute failed: not found
>>> dir(dev)
['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__getattr__',
'__getattribute__', '__hash__', '__init__', '__module__', '__ne__',
'__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__str__', '__weakref__', 'compute_capability', 'count', 'get_attribute',
'get_attributes', 'make_context', 'name', 'total_memory']
This isn't stopping me, I'm just flagging it as an oddity. Let me know if
there's anything I should debug?
Ian.
--
Ian Ozsvald (Professional Screencaster)
ian(a)ProCasts.co.uk
http://ProCasts.co.uk/examples.html
http://TheScreencastingHandbook.com
http://IanOzsvald.com + http://ShowMeDo.com
http://twitter.com/ianozsvald
9 years
Windows runtime error "ImportError: DLL load failed: The specified module could not be found."
by Ian Ozsvald
Following on from the Mac problem yesterday (which is now solved - thanks
Andreas!) I'm having related trouble on Windows XP with this error:
Traceback (most recent call last):
File "demo.py", line 3, in <module>
import pycuda.driver as cuda
File
"C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\driver.py",
line 1, in <module>
from _driver import *
ImportError: DLL load failed: The specified module could not be found.
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>
This report has the same error:
http://www.mail-archive.com/pycuda@tiker.net/msg00656.html
but unlike there I see an 'nvcuda.dll' in my <system32>.
Any thoughts on how I can get past this would be very happily received!
Versions:
Windows XP
Python 2.6.4
distribute.py in use rather than setuptools
pyCUDA: 0.94beta (3 days old)
CUDA 2.3 installed and NVIDIA's CUDA demos run
Numpy 1.4.0
Boost: 1.41 built from source with MS VC 2008 (Visual Studio 9)
Visual Studio 2008 (AKA Visual Studio 9) Team
GFX: NVIDIA 9800GT
Instructions taken from:
http://wiki.tiker.net/PyCuda/Installation/Windows
Boost dlls copied to <system32> and they're in the PATH too:
C:\Documents and Settings\parc\My Documents\Downloads\pycuda_git\pycuda>echo
%PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;c:\program
files\intel\dmix;c:\program files\common files\roxio
shared\dllshared\;c:\program files\common files\roxio
shared\dllshared\;c:\program files\common files\roxio shared\9.0\d
llshared\;c:\python25;C:\Program Files\MATLAB71\bin\win32;c:\Program
Files\Microsoft SQL Server\90\Tools\binn\;C:\Progra
m Files\Git\cmd;C:\Program
Files\TortoiseGit\bin;C:\CUDA\bin;C:\Python26;C:\Program
Files\boost\boost_1_41_0\stage\lib;C
:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;C
:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program
Files\Microsoft Visual Studio\VC98\bin
NOTE above - VC98 is uninstalled, I only have Visual Studio 2008 which was
used for boost.
The boost dlls are:
05/01/2010 17:26 45,056 boost_date_time-vc90-mt-1_41.dll
05/01/2010 17:26 83,456 boost_date_time-vc90-mt-gd-1_41.dll
05/01/2010 18:10 67,584 boost_filesystem-vc90-mt-1_41.dll
05/01/2010 18:09 97,792 boost_filesystem-vc90-mt-gd-1_41.dll
05/01/2010 18:11 113,664 boost_graph-vc90-mt-1_41.dll
05/01/2010 18:10 296,960 boost_graph-vc90-mt-gd-1_41.dll
05/01/2010 18:11 26,624 boost_iostreams-vc90-mt-1_41.dll
05/01/2010 18:10 40,448 boost_iostreams-vc90-mt-gd-1_41.dll
05/01/2010 18:12 83,968 boost_math_c99-vc90-mt-1_41.dll
05/01/2010 18:06 154,624 boost_math_c99-vc90-mt-gd-1_41.dll
05/01/2010 18:12 85,504 boost_math_c99f-vc90-mt-1_41.dll
05/01/2010 18:07 157,696 boost_math_c99f-vc90-mt-gd-1_41.dll
05/01/2010 18:12 82,944 boost_math_c99l-vc90-mt-1_41.dll
05/01/2010 18:07 152,576 boost_math_c99l-vc90-mt-gd-1_41.dll
05/01/2010 18:11 118,784 boost_math_tr1-vc90-mt-1_41.dll
05/01/2010 18:06 235,008 boost_math_tr1-vc90-mt-gd-1_41.dll
05/01/2010 18:12 123,392 boost_math_tr1f-vc90-mt-1_41.dll
05/01/2010 18:06 250,368 boost_math_tr1f-vc90-mt-gd-1_41.dll
05/01/2010 18:12 118,272 boost_math_tr1l-vc90-mt-1_41.dll
05/01/2010 18:06 233,472 boost_math_tr1l-vc90-mt-gd-1_41.dll
05/01/2010 18:14 24,576 boost_prg_exec_monitor-vc90-mt-1_41.dll
05/01/2010 18:08 33,280
boost_prg_exec_monitor-vc90-mt-gd-1_41.dll
05/01/2010 18:12 262,656 boost_program_options-vc90-mt-1_41.dll
05/01/2010 18:07 470,016
boost_program_options-vc90-mt-gd-1_41.dll
05/01/2010 17:21 220,672 boost_python-vc90-mt-1_41.dll
05/01/2010 17:21 512,000 boost_python-vc90-mt-gd-1_41.dll
05/01/2010 18:11 672,768 boost_regex-vc90-mt-1_41.dll
05/01/2010 18:10 1,686,528 boost_regex-vc90-mt-gd-1_41.dll
05/01/2010 18:13 224,256 boost_serialization-vc90-mt-1_41.dll
05/01/2010 18:08 573,440 boost_serialization-vc90-mt-gd-1_41.dll
05/01/2010 18:13 50,176 boost_signals-vc90-mt-1_41.dll
05/01/2010 18:08 112,640 boost_signals-vc90-mt-gd-1_41.dll
05/01/2010 18:10 12,800 boost_system-vc90-mt-1_41.dll
05/01/2010 18:09 16,384 boost_system-vc90-mt-gd-1_41.dll
05/01/2010 17:23 41,984 boost_thread-vc90-mt-1_41.dll
05/01/2010 17:23 61,440 boost_thread-vc90-mt-gd-1_41.dll
05/01/2010 18:14 379,904
boost_unit_test_framework-vc90-mt-1_41.dll
05/01/2010 18:09 1,127,424
boost_unit_test_framework-vc90-mt-gd-1_41.dll
siteconf.py:
BOOST_INC_DIR = ['C:\\Program Files\\boost\\boost_1_41_0']
BOOST_LIB_DIR = ['C:\\Program Files\\boost\\boost_1_41_0\\stage\\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_41']
BOOST_THREAD_LIBNAME = ['boost_thread-vc90-mt-1_41']
CUDA_TRACE = False
CUDA_ROOT = 'c:\\cuda'
CUDA_ENABLE_GL = False
CUDADRV_LIB_DIR = []
CUDADRV_LIBNAME = ['cuda']
CXXFLAGS = ['/EHsc']
LDFLAGS = ['/FORCE']
via:
configure.py --boost-inc-dir="C:\Program Files\boost\boost_1_41_0"
--boost-lib-dir="C:\Program Files\boost\boost_1_41_0\stage\lib"
--boost-compiler=msvc --boost-python-libname=boost_python-vc90-mt-1_41
--boost-thread-libname=boost_thread-vc90-mt-1_41 --cuda-root="c:\cuda"
--cxxflags="/EHsc" --ldflags="/FORCE"
Build process:
# ./build and <site-packages>/pycuda's .egg removed before doing the
following
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda>python setup.py build
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\setuptools-0.6c9-py2.6.egg-info
already exists
C:\Program Files\boost\boost_1_41_0 /boost/ python .hpp
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .lib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .lib
C:\CUDA /bin/ nvcc
C:\CUDA /bin/ nvcc .exe
C:\CUDA\include / cuda .h
c:\cuda\lib / lib cuda .so
c:\cuda\lib / lib cuda .dylib
c:\cuda\lib / lib cuda .lib
c:\cuda\lib / cuda .so
c:\cuda\lib / cuda .dylib
c:\cuda\lib / cuda .lib
running build
running build_py
running build_ext
building '_driver' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -Isrc/cpp "-IC:\Program
Files\boost\boost_1_41_0" -IC:\CUDA\include
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -I
:\Python26\PC /Tpsrc/wrapper/wrap_cudadrv.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/wrap_cudadrv.obj /EHsc
wrap_cudadrv.cpp
src/cpp\cuda.hpp(653) : warning C4930: 'cuda::scoped_context_activation
ca(void)': prototyped function not called (was
variable definition intended?)
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -Isrc/cpp "-IC:\Program
Files\boost\boost_1_41_0" -IC:\CUDA\include
-IC:\Python26\lib\site-packages\numpy\core\include -IC:\Python26\include -I
:\Python26\PC /Tpsrc/wrapper/mempool.cpp
/Fobuild\temp.win32-2.6\Release\src/wrapper/mempool.obj /EHsc
mempool.cpp
src/cpp\cuda.hpp(653) : warning C4930: 'cuda::scoped_context_activation
ca(void)': prototyped function not called (was
variable definition intended?)
src/cpp\bitlog.hpp(35) : warning C4244: 'argument' : conversion from
'boost::uint32_t' to 'boost::uint16_t', possible l
ss of data
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO "/LIBPATH:C:\Program Files\bo
st\boost_1_41_0\stage\lib" /LIBPATH:c:\cuda\lib /LIBPATH:C:\Python26\libs
/LIBPATH:C:\Python26\PCbuild boost_python-vc9
-mt-1_41.lib boost_thread-vc90-mt-1_41.lib cuda.lib /EXPORT:init_driver
build\temp.win32-2.6\Release\src/cpp/cuda.obj b
ild\temp.win32-2.6\Release\src/cpp/bitlog.obj
build\temp.win32-2.6\Release\src/wrapper/wrap_cudadrv.obj build\temp.win3
-2.6\Release\src/wrapper/mempool.obj
/OUT:build\lib.win32-2.6\pycuda\_driver.pyd
/IMPLIB:build\temp.win32-2.6\Release\s
c/cpp\_driver.lib
/MANIFESTFILE:build\temp.win32-2.6\Release\src/cpp\_driver.pyd.manifest
/FORCE
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "void *
__cdecl boost::detail::get_tss_data(void const
)" (?get_tss_data@detail@boost@@YAPAXPBX@Z) already defined in
boost_thread-vc90-mt-1_41.lib(boost_thread-vc90-mt-1_41.
ll); second definition ignored
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "class
boost::thread::id __cdecl boost::this_thread::ge
_id(void)" (?get_id@this_thread@boost@@YA?AVid@thread@2@XZ) already defined
in boost_thread-vc90-mt-1_41.lib(boost_thre
d-vc90-mt-1_41.dll); second definition ignored
libboost_thread-vc90-mt-1_41.lib(thread.obj) : warning LNK4006: "void
__cdecl boost::detail::set_tss_data(void const *,
lass boost::shared_ptr<struct boost::detail::tss_cleanup_function>,void
*,bool)" (?set_tss_data@detail@boost@@YAXPBXV?$
hared_ptr@Utss_cleanup_function@detail@boost@@@2@PAX_N@Z) already defined in
boost_thread-vc90-mt-1_41.lib(boost_thread
vc90-mt-1_41.dll); second definition ignored
Creating library build\temp.win32-2.6\Release\src/cpp\_driver.lib and
object build\temp.win32-2.6\Release\src/cpp\_d
iver.exp
build\lib.win32-2.6\pycuda\_driver.pyd : warning LNK4088: image being
generated due to /FORCE option; image may not run
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest
build\temp.win32-2.6\Release\src/cpp\_driver
pyd.manifest -outputresource:build\lib.win32-2.6\pycuda\_driver.pyd;2
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda>python setup.py install
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\setuptools-0.6c9-py2.6.egg-info
already exists
C:\Program Files\boost\boost_1_41_0 /boost/ python .hpp
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_python-vc90-mt-1_41 .lib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .so
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .dylib
C:\Program Files\boost\boost_1_41_0\stage\lib / lib
boost_thread-vc90-mt-1_41 .lib
C:\CUDA /bin/ nvcc
C:\CUDA /bin/ nvcc .exe
C:\CUDA\include / cuda .h
c:\cuda\lib / lib cuda .so
c:\cuda\lib / lib cuda .dylib
c:\cuda\lib / lib cuda .lib
c:\cuda\lib / cuda .so
c:\cuda\lib / cuda .dylib
c:\cuda\lib / cuda .lib
running install
running bdist_egg
running egg_info
writing requirements to pycuda.egg-info\requires.txt
writing pycuda.egg-info\PKG-INFO
writing top-level names to pycuda.egg-info\top_level.txt
writing dependency_links to pycuda.egg-info\dependency_links.txt
reading manifest file 'pycuda.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycuda.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\autoinit.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\compiler.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\cumath.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\curandom.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\driver.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\elementwise.py ->
build\bdist.win32\egg\pycuda
creating build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gl\autoinit.py ->
build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gl\__init__.py ->
build\bdist.win32\egg\pycuda\gl
copying build\lib.win32-2.6\pycuda\gpuarray.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\reduction.py ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\tools.py -> build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\_driver.pyd ->
build\bdist.win32\egg\pycuda
copying build\lib.win32-2.6\pycuda\__init__.py ->
build\bdist.win32\egg\pycuda
byte-compiling build\bdist.win32\egg\pycuda\autoinit.py to autoinit.pyc
byte-compiling build\bdist.win32\egg\pycuda\compiler.py to compiler.pyc
byte-compiling build\bdist.win32\egg\pycuda\cumath.py to cumath.pyc
byte-compiling build\bdist.win32\egg\pycuda\curandom.py to curandom.pyc
byte-compiling build\bdist.win32\egg\pycuda\driver.py to driver.pyc
byte-compiling build\bdist.win32\egg\pycuda\elementwise.py to
elementwise.pyc
byte-compiling build\bdist.win32\egg\pycuda\gl\autoinit.py to autoinit.pyc
byte-compiling build\bdist.win32\egg\pycuda\gl\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\pycuda\gpuarray.py to gpuarray.pyc
byte-compiling build\bdist.win32\egg\pycuda\reduction.py to reduction.pyc
byte-compiling build\bdist.win32\egg\pycuda\tools.py to tools.pyc
byte-compiling build\bdist.win32\egg\pycuda\__init__.py to __init__.pyc
creating stub loader for pycuda\_driver.pyd
byte-compiling build\bdist.win32\egg\pycuda\_driver.py to _driver.pyc
installing package data to build\bdist.win32\egg
running install_data
creating build\bdist.win32\egg\include
creating build\bdist.win32\egg\include\pycuda
copying src\cuda\pycuda-helpers.hpp -> build\bdist.win32\egg\include\pycuda
creating build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\dependency_links.txt ->
build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying pycuda.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
writing build\bdist.win32\egg\EGG-INFO\native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist\pycuda-0.94beta-py2.6-win32.egg' and adding
'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing pycuda-0.94beta-py2.6-win32.egg
creating c:\python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg
Extracting pycuda-0.94beta-py2.6-win32.egg to c:\python26\lib\site-packages
Adding pycuda 0.94beta to easy-install.pth file
Installed c:\python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg
Processing dependencies for pycuda==0.94beta
Searching for py==1.1.1
Best match: py 1.1.1
Processing py-1.1.1-py2.6.egg
py 1.1.1 is already the active version in easy-install.pth
Installing py.lookup-script.py script to C:\Python26\Scripts
Installing py.lookup.exe script to C:\Python26\Scripts
Installing py.countloc-script.py script to C:\Python26\Scripts
Installing py.countloc.exe script to C:\Python26\Scripts
Installing py.test-script.py script to C:\Python26\Scripts
Installing py.test.exe script to C:\Python26\Scripts
Installing py.which-script.py script to C:\Python26\Scripts
Installing py.which.exe script to C:\Python26\Scripts
Installing py.cleanup-script.py script to C:\Python26\Scripts
Installing py.cleanup.exe script to C:\Python26\Scripts
Installing py.svnwcrevert-script.py script to C:\Python26\Scripts
Installing py.svnwcrevert.exe script to C:\Python26\Scripts
Installing py.convert_unittest-script.py script to C:\Python26\Scripts
Installing py.convert_unittest.exe script to C:\Python26\Scripts
Using c:\python26\lib\site-packages\py-1.1.1-py2.6.egg
Searching for pytools==9
Best match: pytools 9
Processing pytools-9-py2.6.egg
pytools 9 is already the active version in easy-install.pth
Installing logtool script to C:\Python26\Scripts
Installing runalyzer script to C:\Python26\Scripts
Installing runalyzer-gather script to C:\Python26\Scripts
Using c:\python26\lib\site-packages\pytools-9-py2.6.egg
Finished processing dependencies for pycuda==0.94beta
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in <module>
import pycuda.driver as cuda
File
"C:\Python26\lib\site-packages\pycuda-0.94beta-py2.6-win32.egg\pycuda\driver.py",
line 1, in <module>
from _driver import *
ImportError: DLL load failed: The specified module could not be found.
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\examples>
For reference:
C:\Documents and Settings\parc\My Documents\Downloads\pycuda_git\pycuda>dir
c:\cuda\lib
Volume in drive C has no label.
Volume Serial Number is ACC0-A99C
Directory of c:\cuda\lib
08/12/2009 14:22 <DIR> .
08/12/2009 14:22 <DIR> ..
03/08/2009 21:25 20,436 cublas.lib
03/08/2009 21:25 19,700 cublasemu.lib
03/08/2009 21:25 33,992 cuda.lib
03/08/2009 21:25 31,952 cudart.lib
03/08/2009 21:25 3,730 cufft.lib
03/08/2009 21:25 3,796 cufftemu.lib
Looking inside _driver.pyd:
C:\Documents and Settings\parc\My
Documents\Downloads\pycuda_git\pycuda\build\lib.win32-2.6\pycuda\_driver.pyd
I see references to:
boost_python-vc90-mt-1_41.dll
boost_thread-vc90-mt-1_41.dll
nvcuda.dll
MSVCP90.dll
python26.dll
MSVCR90.dll
KERNEL32.dll
The following didn't exist in my <system32>:
MSVCP90.dll
MSVCR90.dll
so I've copied them over from:
C:\Program Files\Microsoft Visual Studio
9.0\VC\redist\x86\Microsoft.VC90.CRT
but I still get the same error above.
I've also installed the MS VC 2008 Redistributable Package:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-43...
and that made no difference either.
Thoughts happily received!
Cheers,
Ian.
--
Ian Ozsvald (Professional Screencaster)
ian(a)ProCasts.co.uk
http://ProCasts.co.uk/examples.html
http://TheScreencastingHandbook.com
http://IanOzsvald.com + http://ShowMeDo.com
http://twitter.com/ianozsvald
9 years
Comparison of speed-ups for measure_gpuarray_speed_random.py on 9800GT vs 9400M
by Ian Ozsvald
Below I'm posting the results for running:
python measure_gpuarray_speed_random.py
on a Windows XP desktop with a 9800GT card vs a MacBook with a 9400M card.
Whilst any real speed-ups are likely to depend on the type of problem you're
solving I figure that sharing these numbers might help others decide what
kind of card they might need to experiment with.
I think I'm right in saying that this particular test just fills
increasingly large arrays with random numbers via the GPU and the CPU so
mostly we're looking at memory operations rather than raw processing power?
I'm using:
Python 2.6
pyCUDA 0.94beta (as of the first week of January)
numpy 1.4
Boost 1.38 (Windows) and 1.41 (Mac)
CUDA 2.3
"python measure_gpuarray_speed_random.py" on Windows XP using 9800GT
with an Intel Core 2 Duo CPU at 2.66GHz (though only 1 CPU seems to be
used), 1GB RAM
====
1024
kernel.cu
tmpxft_00000d5c_00000000-3_kernel.cudafe1.gpu
tmpxft_00000d5c_00000000-8_kernel.cudafe2.gpu
kernel.cu
tmpxft_00000b98_00000000-3_kernel.cudafe1.gpu
tmpxft_00000b98_00000000-8_kernel.cudafe2.gpu
2048
<snip>
16777216
Size |Time GPU |Size/Time GPU|Time CPU |Size/Time CPU|GPU
vs CPU speedup
--------+----------------+-------------+-----------------+-------------+------------------
1024 |0.003523625
|290609.812338|4.28882865906e-05|23875982.9642|0.0121716376148
2048 |0.00218711889648|936391.708422|5.3062335968e-05
|38596114.6007|0.0242612946435
4096 |0.0021967746582
|1864551.73484|0.000110264831543|37146930.1924|0.0501939655627
8192
|0.00221661279297|3695728.91846|0.000205230010986|39916189.4531|0.0925872175949
16384
|0.00223460498047|7331944.63594|0.000410583557129|39904179.5891|0.183738763995
32768 |0.00231461450195|14157001.0783|0.00081089276123
|40409782.3617|0.350335989231
65536 |0.00240575585938|27241334.4624|0.00189025 |34670546.224
|0.785719794731
131072 |0.00242032714844|54154662.5565|0.00420794775391
|31148675.7121|1.73858635459
262144 |0.00271729394531|96472448.4269|0.00867364941406 |30223033.868
|3.19201734837
524288 |0.00303069091797|172992896.402|0.0177443378906
|29546777.3005|5.85488206185
1048576 |0.00344940429687|303987561.258|0.035467828125
|29564144.6187|10.282305312
2097152 |0.00441471038818|475037276.65 |0.0707175488281
|29655326.5031|16.0186156305
4194304 |0.0064045324707 |654896203.46 |0.150012763672
|27959647.5482|23.4229062555
8388608 |0.010213684082 |821310697.749|0.278191074219
|30154123.4691|27.2370940774
16777216|0.0179603649902 |934124446.197|0.556249179688
|30161331.6705|30.9709284856
====
"python measure_gpuarray_speed_random.py" on Mac OS X (Leopard) using 9400M
with an Intel Core 2 Duo at 2GHz (again only 1 CPU seems to be used), 2GB
RAM
====
1024
<snip>
16777216
Size |Time GPU |Size/Time GPU|Time CPU |Size/Time CPU|GPU
vs CPU speedup
--------+----------------+-------------+-----------------+-------------+------------------
1024 |0.00362544628906|282447.985256|4.3817150116e-05
|23369844.8505|0.0120860017284
2048
|0.00307543896484|665921.198051|0.000121678268433|16831271.7331|0.0395645206501
4096 |0.00287928857422|1422573.6304
|0.000244288223267|16767079.2526|0.0848432579679
8192
|0.00307496777344|2664092.96083|0.000451083526611|18160716.4011|0.146695367187
16384 |0.00307557250977|5327138.26384|0.000869509094238|18842816.146
|0.282714548747
32768 |0.0033080065918 |9905663.45341|0.00175915466309
|18627128.5224|0.531786927949
65536 |0.00350910644531|18675979.4897|0.00342910791016
|19111676.1902|0.977202590915
131072 |0.00442680712891|29608699.0427|0.00722674365234
|18137076.1584|1.63249571122
262144 |0.00605847070312|43269005.141 |0.0149418457031
|17544285.0374|2.46627349298
524288 |0.00753005224609|69626077.3319|0.0304311484375
|17228662.9628|4.04129313356
1048576 |0.012277375 |85407181.9098|0.0603436679688
|17376736.2061|4.91503012401
2097152 |0.0224226953125 |93528096.0104|0.133947558594
|15656515.2961|5.97374921823
4194304 |0.0410210205078 |102247675.657|0.242842695312
|17271691.0204|5.91995743417
8388608 |0.0780941503906 |107416598.529|0.482362148437
|17390684.6281|6.17667451435
16777216|0.153209472656 |109505082.872|0.949726328125 |17665316.316
|6.19887472791
====
Conclusion?
Is it ok to say that the 9800GT GPU is about 10* faster than the 9400M for
this test for the 16777216 problem (the time taken is 0.017 vs 0.15)? Is
the timing dependent on the bus speed at all, or is the GPU time purely down
to the GPU's speed?
Cheers,
Ian.
--
Ian Ozsvald (Professional Screencaster)
ian(a)ProCasts.co.uk
http://ProCasts.co.uk/examples.html
http://TheScreencastingHandbook.com
http://IanOzsvald.com + http://ShowMeDo.com
http://twitter.com/ianozsvald
9 years
time.time() percision is very low on windows
by Alexander
Precision of time.time() function on windows is about 15ms,
which makes it almost useless for profiling. This function
is used for 'time_kernel=True' launches.
Is it possible to change it to time.clock(),
which works much better on windows?
9 years
Get PyCuda 0.93 working on Snow Leopard
by Krunal Patel
Hi there,
my name is Krunal and I'm a new user to PyCUDA. I'm helping Nicolas out on his research. My first order of business was to get PyCUDA installed on my iMac Snow Leopard. Here were my experiences:
1) stick with the version of python installed by Mac, don't upgrade to the latest. The default version is 2.6.1. The main reason for this is because I couldn't figure out how to run a newly upgraded version of python in 32-bit mode.
2) I tried 1.38-1.41 versions of Boost. At the end, the one that worked for me was 1.39.
Here is how I got things working:
1) first follow: http://wiki.tiker.net/BoostInstallationHowto
but do this:
./bootstrap.sh --prefix=$HOME/pool --libdir=$HOME/pool/lib --with-libraries=signals,thread,python
./bjam address-model=32_64 architecture=x86 variant=release link=shared install
(the architecture stuff comes from http://old.nabble.com/Boost-on-Snow-Leopard-failing-to-build-32-bit-targe... and is the key to not getting the architecture is invalid when running test_driver.py)
2) then follow: http://wiki.tiker.net/PyCuda/Installation/Mac
but do this:
python configure.py --boost-inc-dir=/Users/k5patel/pool/include/boost-1_39/ --boost-lib-dir=/Users/k5patel/pool/lib/ --boost-python-libname=boost_python --cuda-root=/usr/local/cuda/
siteconf.py shoud look like:
BOOST_INC_DIR = ['/Users/k5patel/pool/include/boost-1_39/']
BOOST_LIB_DIR = ['/Users/k5patel/pool/lib/']
BOOST_COMPILER = 'gcc42'
BOOST_PYTHON_LIBNAME = ['boost_python-xgcc42-mt']
BOOST_THREAD_LIBNAME = ['boost_thread-xgcc42-mt']
CUDA_TRACE = False
CUDA_ROOT = '/usr/local/cuda/'
CUDA_ENABLE_GL = False
CUDADRV_LIB_DIR = []
CUDADRV_LIBNAME = ['cuda']
CXXFLAGS = []
LDFLAGS = []
change setup.py so it has this:
if 'darwin' in sys.platform:
# prevent from building ppc since cuda on OS X is not compiled for ppc
if "-arch" not in conf["CXXFLAGS"]:
conf["CXXFLAGS"].extend(['-arch', 'i386','-m32'])
if "-arch" not in conf["LDFLAGS"]:
conf["LDFLAGS"].extend(['-arch', 'i386','-m32'])
the key is -m32 as indicated by http://article.gmane.org/gmane.comp.python.cuda/1089
3) do sudo make install. ensure that there are no warnings around the line of "different architecture"
4) once built, go to the test directory and type in:
python test_driver.py
hopefully it passes
don't type:
sudo python test_driver.py as indicated elsewhere
I hope this could be of help to those who couldn't get PyCUDA 0.93 working on their system. The main problem has to do with SL's 64-bitness and CUDA's lack of it (and hence PyCUDA)....
krunal
9 years
Windows - 7 Support - Package
by Robert Pickel
Hello,
I'm new to the list. A quick search didn't show any post asking if pycuda
can run under windows 7.
Are there any pre-built windows packages out there?
Thanks,
Robert
9 years
use PyCUDA or PyOpenCL without Visual Studio
by Bogdan
Hello,
I am interested in testing the GPU processing capabilities of a Quadro FX 570
card. I would like to know if it's possible to install and use PyCUDA (and/or
PyOpenCL) without Visual Studio on a Windows computer. The instructions at
http://wiki.tiker.net/PyCuda/Installation/Windows don't indicate such an option.
On a related note, when I check the current driver version for the card, I see
8.16.11.9100 (which seems to have CUDA capabilities). How is this related to the
190.38 version that NVIDIA provides on the Download CUDA page?
Thank you.
Best regards,
Bogdan
9 years
Optical ray tracing
by Elliot Hallmark
Hey there.
I've been working with others on a non-sequential optical ray tracing
program in python (modeling optical systems, not rendering fancy images).
I was curious about using cuda to speed up processing, but I do not know
enough about what GPU's do well and not so well. Also, I wonder if there
are any open projects that have already written code that would work for
this.
The program currently takes an array of origins and directions. i use 5,000
but more like 100,000 rays would be excellent. And then intersections
between those rays and all of the dozen or so optical elements are
calculated. truth tests determine which of all of those intersections have
children (ie, are the real rays). this iterates till all of the rays are
absorbed or at infinity.
Soon, that whole process will be iterated many times while the computer
tries to optimise the optical system.
even with only 5,000 rays, 5000 rays*12 elements*10 bounces*30 iterations
for optimization quickly becomes a lot of processing.
Is this problem suited for cuda? Is there any active or open development on
this already? Also, I wonder how much of our code would have to be rewritten
to accommodate this. There is talk of rewriting the intersection
calculations in faster C, and if it is a comparable ammount of work to do it
in cuda instead then great! If we should have just written everything in
pycuda to start with, then I guess I'll be back if I ever want to write a
new raytracer.
thanks.
Our raytracer can be found at:
http://bitbucket.org/bryancole/raytrace/overview/
9 years
Where oh where is my console output?
by ssteinerX@gmail.com
Hi!
First, let me apologize for e-mailing Andreas -- I only found the mailing list after spelunking around (doesn't seem to be on the wiki!).
I'm debugging some long-running apps that dump lots of good info to the console.
Then, I need to debug some little tiny piece of code and use pudb.
I know my console output is buffered somewhere 'cause I see it go by when I let pudb run for a while with no breakpoints.
Can I switch to it to see what was last printed to the console from pudb?
Seems so obvious but I don't see anything in the mailing list except for something about logging and cuda.
Thanks,
S
aka/Steve Steiner
aka/ssteinerX
9 years, 1 month
How do I make a multichannel 1D texture?
by Dan Piponi
I'm having trouble figuring out how to make a 4 channel 1D texture for
use with tex1D.
I can easily make a 2D 4 channel texture, from an MxNx4 numpy 3D
array, using make_multichannel_2d_array and bind_array_to_texref. The
third axis of the array has size 4 and becomes the 4 channels in a
float4 texture. Works fine with tex2D.
But I can't find a sequence of calls that takes an Nx4 numpy 2D array,
with size 4 in the second axis, and turns it into a 4 channel 1D
texture suitable for use with tex1D. I can't find something
corresponding to make_multichannel_1d_array.
So starting with an Nx4 2D numpy array, what sequence of calls do I
need to make to get 1D texture with float4 elements?
--
Dan
9 years, 1 month